Thanks Remy,

Yes, I was originally going to do that too, and then thought:  why not try
to bunch everything at the bottom of the script file where it's easier to
find.
I'll probably go with your suggestion and just source control the script.
I was intending to source-control the diff results if I could get the
delete syntax to work.

Peter

On Thu, Aug 20, 2020 at 1:16 PM Remy Sanouillet <re...@foreseemed.com>
wrote:

> I ended up just running a sed script before deploying the dictionary, that
> way I could source code control all the modifications to the original file.
>
> *Rémy Sanouillet*
> NLP Engineer
> re...@foreseemed.com <xx...@foreseemed.com>
>
>
> [image: cid:347EAEF1-26E8-42CB-BAE3-6CB228301B15]
> ForeSee Medical, Inc.
> 12555 High Bluff Drive, Suite 100
> San Diego, CA 92130
>
> NOTICE: This e-mail message and all attachments transmitted with it are
> intended solely for the use of the addressee and may contain legally
> privileged and confidential information. If the reader of this message is
> not the intended recipient, or an employee or agent responsible for
> delivering this message to the intended recipient, you are hereby notified
> that any dissemination, distribution, copying, or other use of this message
> or its attachments is strictly prohibited. If you have received this
> message in error, please notify the sender immediately by replying to this
> message and please delete it from your computer.
>
>
> On Thu, Aug 20, 2020 at 11:33 AM Peter Abramowitsch <
> pabramowit...@gmail.com> wrote:
>
>> Hi All
>>
>> In tailoring a new ctakes dictionary and trying to keep the changes as
>> compact and easy to manage as possible, I'm clumping all modifications
>> together at the end of the script file.  This would include both additions
>> and deletions.
>>
>> Inserting into CUI_TERMS is no problem, but I have at least one instance
>> where I'd like to delete from CUI_TERMS, rather than deleting the INSERT
>> statement that put the term synonym into the script file in the first
>> place.   However, I haven't found an SQL DELETE statement that hsqldb
>> likes.    Here are some examples I tried
>>
>> DELETE FROM CUI_TERMS WHERE CUI=1414063 AND TEXT='lad'
>> DELETE FROM CUI_TERMS WHERE CUI=1414063 AS NUMBER AND TEXT='lad'
>> DELETE FROM CUI_TERMS WHERE CUI=1414063 AS BIGINT AND TEXT='lad'
>> DELETE FROM CUI_TERMS WHERE CUI='1414063' AS NUMBER AND TEXT='lad'
>>
>> In all cases the script reader is treating the CUI value as a string and
>> complaining that it can't cast it to an Integer/Number etc, which is why I
>> also tried explicit casting, but that didn't work either.
>>
>> >>>
>> error in script file line: 1850042 java.lang.ClassCastException:
>> java.lang.String cannot be cast to java.lang.Integer
>> >>>
>>
>> Has anyone successfully put DELETE statements in the script file?
>>
>> Regards
>> Peter
>>
>

Reply via email to