Hi Gandhi, Sean, and James Thank you all for your help.
It ran fine but after some time, I started getting the following error- ERROR JdbcRareWordDictionary - No operations allowed after statement closed. The class giving the issue is - https://github.com/apache/ctakes/blob/bed6cca07743e30aec40aae30af1738a0ba1a93d/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/dictionary/JdbcRareWordDictionary.java It looks like the statement is getting closed by a thread and another thread is trying to use it. mysqlUrl entred - jdbc:mysql:// 127.0.0.1:3306/umlstest?useUnicode=true&characterEncoding=utf8&useSSL=false& Is there a MySQL setting I need to change or the code in JdbcRareWordDictionary.java like creating a connection pool? Regards Chahal Arora Regards Chahal Arora Software Engineer Raxa On Sat, Dec 23, 2017 at 8:08 AM, James Masanz <masanz.ja...@gmail.com> wrote: > one advantage of having the database entries be lower-case is performance. > > since a dictionary in a database is typically significantly larger than a > BSV file dictionary, it is advantageous to lower case the database > dictionary entries just once. > > > On Thu, Dec 21, 2017 at 4:17 PM, Chahal Arora <chahal.ar...@raxa.com> > wrote: > > > Hi Sean, > > > > I wanted the lookup to be case insensitive. Also wanted to go away with > the > > restriction of putting enteries in lowercase in database like the way it > > was working with BSV. > > > > But if lowercase enteries are expected in database then I guess modifying > > database will work for me. > > > > On Fri, 22 Dec 2017 at 12:46 AM, Finan, Sean < > > sean.fi...@childrens.harvard.edu> wrote: > > > > > 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=fs67GvlGZstTpyIisCYNYmQCP6r0bc > pKGd4f7d4gTao&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=fs67GvlGZstTpyIisCYNYmQCP6r0bc > pKGd4f7d4gTao&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.Natarajan@ > 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. > > > > > > -- > > Regards > > Chahal Arora > > Software Engineer > > Raxa > > >