incubator-ctakes-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Pei" <Pei.C...@childrens.harvard.edu>
Subject RE: Can't find lookup dictionary from pear
Date Fri, 02 Nov 2012 18:42:02 GMT
Hi Kline,
I presume this is cTAKES version 2.5?
Is the parent folder of "drugnerrrsources/lookup/g2_index" in the classpath of your container
(jboss?) ?
My guess is that:
1) The resource is not in the classpath
2) The g2_index was lost during the creation of the pear and eventually into the war? i.e.
does the new g2_index folder really exist in the target folder where the old classpath used
to point?

Note: You can also try an file absolute path to verify that indeed that is a classpath issue.

Hope that helps.
Thanks,
Pei

From: Kline, Larry D [mailto:Larry.Kline@USONCOLOGY.COM] 
Sent: Friday, November 02, 2012 2:30 PM
To: ctakes-user@incubator.apache.org
Subject: Can't find lookup dictionary from pear

I am using the cTAKES DictionaryLookup pipeline to find drug mentions in documents.  When
I run this from eclipse it works perfectly.  But when I run from a pear file that I generated
it fails.  It appears that it cannot find the Lucene lookup dictionary folder that I created. 
This is the exception:

       ... 16 more
Caused by: java.io.FileNotFoundException: drugnerresources/lookup/g2_index
       at edu.mayo.bmi.uima.core.resource.FileLocator.locateExplicitly(FileLocator.java:74)
[classes:]
       at edu.mayo.bmi.uima.core.resource.FileLocator.locateFile(FileLocator.java:49)
[classes:]
       at edu.mayo.bmi.uima.core.resource.LuceneIndexReaderResourceImpl.load(LuceneIndexReaderResourceImpl.java:61)
[classes:]
       ... 52 more

There's a large stack trace before this but this is the relevant part.  It gets to this code
(locateExplicitly()) only if a class loader get resource call fails.  That should probably
have worked.

In my DictionaryLookupAnnotator I have this:

      <externalResource>
        <name>RxnormIndex</name>
        <description/>
        <configurableDataResourceSpecifier>
          <url/>
          <resourceMetaData>
            <name/>
            <configurationParameters>
              <configurationParameter>
                <name>UseMemoryIndex</name>
                <type>Boolean</type>
                <multiValued>false</multiValued>
                <mandatory>true</mandatory>
              </configurationParameter>
              <configurationParameter>
                <name>IndexDirectory</name>
                <type>String</type>
                <multiValued>false</multiValued>
                <mandatory>true</mandatory>
              </configurationParameter>
            </configurationParameters>
            <configurationParameterSettings>
              <nameValuePair>
                <name>UseMemoryIndex</name>
                <value>
                  <boolean>true</boolean>
                </value>
              </nameValuePair>
              <nameValuePair>
                <name>IndexDirectory</name>
                <value>
                  <string>drugnerresources/lookup/g2_index</string>
                </value>
              </nameValuePair>
            </configurationParameterSettings>
          </resourceMetaData>
        </configurableDataResourceSpecifier>
        <implementationName>edu.mayo.bmi.uima.core.resource.LuceneIndexReaderResourceImpl</implementationName>
      </externalResource>
    </externalResources>

You can see the definition of IndexDirectory is what it cannot find.  The location does exist
at <project_root>/resources/drugnerresources/lookup/g2_index.  I replaced g2_index
with rxnorm_index, which is something that came with the cTAKES distribution and that does
not work either.

When I build my pear file I include only the desc, resources, and metadata folders from my
project.  The pear goes into the war directory and the war is deployed to a jboss 7.1 server. 
I can see the pear being unpacked when the war is deployed.  Without the drug lookup all
of this has worked perfectly for months.  But this is the first time I am trying to use the
cTAKES drug lookup.

Thanks,
Larry Kline
</pre>The contents of this electronic mail message and any attachments are confidential,
possibly privileged and intended for the addressee(s) only.<br>Only the addressee(s)
may read, disseminate, retain or otherwise use this message. If received in error, please
immediately inform the sender and then delete this message without disclosing its contents
to anyone.</pre>

Mime
View raw message