Do you want your lookup to be case sensitive?  If so then new code would be 
required.  The lookup is case insensitive because it does expect the 
dictionary/database to contain only lowercase entries.  If you are ok with the 
case insensitivity then I propose that you modify your database.
Sean


-----Original Message-----
From: Gandhi Rajan Natarajan [mailto:gandhi.natara...@arisglobal.com] 
Sent: Thursday, December 21, 2017 11:06 AM
To: dev@ctakes.apache.org
Subject: RE: Custom Dictionary connected to mysql [EXTERNAL]

I feel Sean and Tim will be the right persons to answer this.



Regards,

Gandhi



-----Original Message-----

From: Chahal Arora [mailto:chahal.ar...@raxa.com]

Sent: Thursday, December 21, 2017 7:32 PM

To: dev@ctakes.apache.org

Subject: Re: Custom Dictionary connected to mysql



Hi Gandhi, Thank you for your help. It's working now. In the 
customDictionary.xml, I changed 
org.apache.ctakes.dictionary.lookup2.dictionary.JdbcRareWordDictionary to 
org.apache.ctakes.dictionary.lookup2.dictionary.UmlsJdbcRareWordDictionary

and org.apache.ctakes.dictionary.lookup2.concept.JdbcConceptFactory to 
org.apache.ctakes.dictionary.lookup2.concept.UmlsJdbcConceptFactory. For single 
word term, this worked without any change, but for a multi-word term, this was 
returning empty results. When I debugged, I found that the issue was coming at 
code below in DefaultJCasTermAnnotator class line 103- if ( hitTokens[ hit 
].equals(allTokens.get( i ).getText() ) || hitTokens[ hit ].equals( 
allTokens.get( i ).getVariant() ) ); This was happening due to the difference 
in string case. The input string is converted to lowercase, but the string from 
MySQL database is not converted. Right now I have to put all terms in my 
database in lower case to make it work. Do you know any configuration so that I 
don't have to deal with the case issue without changing 
DefaultJCasTermAnnotator file? When using BSV file, I am getting lower case 
sting for both input and term.







Regards

Chahal Arora

Software Engineer

Raxa



On Tue, Dec 19, 2017 at 11:23 PM, Gandhi Rajan Natarajan < 
gandhi.natara...@arisglobal.com> wrote:



> Hi Chahal,

>

> Looking at the error trace:

> ‘javax.servlet.ServletException,java.io.IOException

> 19 Dec 2017 17:56:01  INFO RequestMappingHandlerAdapter - Looking for

> @ControllerAdvice: WebApplicationContext for namespace

> 'ctakes-rest-service-servlet'’

>

> It looks like you are trying to mix match codes from both

> ctakes-rest-service and ctakes-web-rest module I guess.

> Ctakes-rest-service module is obsolete now and request you to consider

> only ctakes-web-rest module  in

> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_GoTeamEpsilon_ctakes-2Drest-2D&d=DwIGaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=FqnIF6F3Z8G6N9y2xdT6hsGRUtI9Gkcio-84DqbbEJM&s=6B-VtVwKMYDaxqmRYJgeUq-3W2oT9wb6XDlnckfJ9rU&e=

> service/tree/master/ctakes-web-rest

>

> Regards,

> Gandhi

>

> From: Chahal Arora [mailto:chahal.ar...@raxa.com]

> Sent: Tuesday, December 19, 2017 8:20 PM

> To: dev@ctakes.apache.org

> Subject: Re: Custom Dictionary connected to mysql

>

> Hi Gandhi,

>

> With updated customDictionary.xml all errors were gone.

>

> I am not sure about the schema of the tables used. I have taken

> reference from JdbcRareWordDictionary.java -

> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_&d=DwIGaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=FqnIF6F3Z8G6N9y2xdT6hsGRUtI9Gkcio-84DqbbEJM&s=JLcnqVyhD1PRoXduqLRON_SkVHeLv0q7doqV6RSn-7A&e=

> ctakes/blob/trunk/ctakes-dictionary-lookup-fast/src/

> main/java/org/apache/ctakes/dictionary/lookup2/dictionary/

> JdbcRareWordDictionary.java  and JdbcConceptFactory.java -

> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_ctakes_blob_trunk_ctakes-2D&d=DwIGaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=FqnIF6F3Z8G6N9y2xdT6hsGRUtI9Gkcio-84DqbbEJM&s=cfygw3v7SDiH3Wjz_VepLVO006NEJBCH79qO3sHBlm4&e=

> dictionary-lookup-fast/src/main/java/org/apache/ctakes/

> dictionary/lookup2/concept/JdbcConceptFactory.java

>

> I am using the ctakes-rest-web server and getting all the annotation

> array as empty in the result json.

>

> Attached tomcat logs again.

>

> Regards

> Chahal Arora

> Software Engineer

> Raxa

>

> On Tue, Dec 19, 2017 at 6:44 PM, Gandhi Rajan Natarajan <

> gandhi.natara...@arisglobal.com<mailto:gandhi.natara...@arisglobal.com

> >>

> wrote:

> Not able to see any tomcat logs attached.

>

> Do you see any errors in tomcat console?

>

> Regards,

> Gandhi

>

> From: Chahal Arora [mailto:chahal.ar...@raxa.com<mailto:

> chahal.ar...@raxa.com>]

> Sent: Tuesday, December 19, 2017 6:09 PM

> To: dev@ctakes.apache.org<mailto:dev@ctakes.apache.org>

> Subject: Re: Custom Dictionary connected to mysql

>

> Hi,

>

> I have updated the customDictionary.xml and all the erros have gone

> but still not getting any result. I am attaching the latest

> customDictionary.xml and tomcat logs file.

>

>

>

> Regards

> Chahal Arora

> Software Engineer

> Raxa

>

> On Tue, Dec 19, 2017 at 5:45 PM, Chahal Arora <chahal.ar...@raxa.com

> <mailto:chahal.ar...@raxa.com><mailto:chahal.ar...@raxa.com<mailto:c

> hahal.ar...@raxa.com>>> wrote:

> Hi All,

>

> I was working on moving the terms from custom dictionary BSV file to

> MySQL database in LabValueFinder. I am able to connect to the database

> but not sure about the database schema.

>

> Is there an example available where the custom dictionary is connected

> to mysql database instead of a bsv file or hsql database?

>

> Attached is the customDictionary.xml file that I am using.

>

>

> Regards

> Chahal Arora

> Software Engineer

> Raxa

>

> This email and any files transmitted with it are confidential and

> intended solely for the use of the individual or entity to whom they are 
> addressed.

> If you are not the named addressee you should not disseminate,

> distribute or copy this e-mail. Please notify the sender or system

> manager by email immediately if you have received this e-mail by

> mistake and delete this e-mail from your system. If you are not the

> intended recipient you are notified that disclosing, copying,

> distributing or taking any action in reliance on the contents of this

> information is strictly prohibited and against the law.

>

> This email and any files transmitted with it are confidential and

> intended solely for the use of the individual or entity to whom they are 
> addressed.

> If you are not the named addressee you should not disseminate,

> distribute or copy this e-mail. Please notify the sender or system

> manager by email immediately if you have received this e-mail by

> mistake and delete this e-mail from your system. If you are not the

> intended recipient you are notified that disclosing, copying,

> distributing or taking any action in reliance on the contents of this

> information is strictly prohibited and against the law.

>

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you are not the named addressee you should not disseminate, distribute or copy 
this e-mail. Please notify the sender or system manager by email immediately if 
you have received this e-mail by mistake and delete this e-mail from your 
system. If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited and against the law.

Reply via email to