ctakes-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pei Chen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CTAKES-364) Dictionary-Lookup-Fast will fail with URI is not Hierarchical
Date Thu, 25 Jun 2015 19:55:04 GMT
Pei Chen created CTAKES-364:
-------------------------------

             Summary: Dictionary-Lookup-Fast will fail with URI is not Hierarchical 
                 Key: CTAKES-364
                 URL: https://issues.apache.org/jira/browse/CTAKES-364
             Project: cTAKES
          Issue Type: Bug
          Components: ctakes-dictionary-lookup
            Reporter: Pei Chen


Have the resource read in a stream rather than a File Resource Object.
http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/ae/AbstractJCasTermAnnotator.java

initalize()
//This will assume that resource descriptor xml can only be read in by physical java File
objects.  If they are inside a jar, it will fail with URI is not Hierarchical
final FileResource fileResource = (FileResource)uimaContext.getResourceObject( DICTIONARY_DESCRIPTOR_KEY
);
         final File descriptorFile = fileResource.getFile();

The configuration can just take in a String path and use InputStream FileLocator.locate()
to read it in from the stream.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message