You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ctakes.apache.org by Graham Pitson <gp...@alphalink.com.au> on 2015/12/15 01:03:37 UTC

New user question on use of side effect component

Hi,

I've installed cTakes and am hoping for some help getting started.

I've downloaded and installed 3.2.2, including the umls dictionary. User 
name and password are setup and the user install demos are working for 
CVD and CPE.

I'm trying to look at the side effect component run against some plain 
text files as a next step and having problems with  file not found for 
"apache-ctakes-3.2.2\desc\ctakes-drug-ner\desc\analysis_engine\DrugCNP2LookupWindow.xml 
". Indeed, the file does not exist on my system

Loading and running SideEffectCPE.xml in the CPE gives the error 
messages below as per the CPE log (apologies for the length but I've 
posted more rather than less of the log). I get similar messages in the CVD.

So I'm wondering whether I'm actually missing the file or whether I 
haven't configured my system/request properly.

Any help would be appreciated.

Graham



-------------------------------------log file 
follows-----------------------------------

C:\Users\gpits\ctakes\apache-ctakes-3.2.2>cd 
C:\Users\gpits\ctakes\apache-ctakes-3.2.2

C:\Users\gpits\ctakes\apache-ctakes-3.2.2>java -cp 
"C:\Users\gpits\ctakes\apache-ctakes-3.2.2/desc/;C:\Users\gpits\ctakes\apache-ctakes-3.2.2/resources/;C:\Users\gpits\ctakes\apache-ctakes-3.2.2/lib/*" 
-Dlog4j.configuration=file:/C:\Users\gpits\ctakes\apache-ctakes-3.2.2/config/log4j.xml 
-Xms512M -Xmx3g org.apache.uima.tools.cpm.CpmFrame
Dec 15, 2015 10:41:21 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs 
at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
org.apache.uima.resource.ResourceInitializationException: Initialization 
of CAS Processor with name "SideEffectSentenceAggregateTAE" failed.
     at 
org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:83)
     at 
org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine(UIMAFramework_impl.java:420)
     at 
org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(UIMAFramework.java:864)
     at 
org.apache.uima.tools.cpm.CpmPanel.startProcessing(CpmPanel.java:573)
     at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java:105)
     at org.apache.uima.tools.cpm.CpmPanel$1.run(CpmPanel.java:713)
Caused by: org.apache.uima.resource.ResourceConfigurationException: 
Initialization of CAS Processor with name 
"SideEffectSentenceAggregateTAE" failed.
     at 
org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1104)
     at 
org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(CPEFactory.java:550)
     at 
org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(BaseCPMImpl.java:253)
     at 
org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(BaseCPMImpl.java:127)
     at 
org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:75)
     ... 5 more
Caused by: org.apache.uima.resource.ResourceInitializationException: 
Import failed.  Could not read from URL 
file:/C:/Users/gpits/ctakes/apache-ctakes-3.2.2/desc/ctakes-drug-ner/desc/analysis_engine/DrugCNP2LookupWindow.xml. 
(Descriptor: 
file:/C:/Users/gpits/ctakes/apache-ctakes-3.2.2/desc/ctakes-side-effect/desc/analysis_engine/LookupWindowAnnotator_sideEffect.xml)
     at 
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:159)
     at 
org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
     at 
org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
     at 
org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:269)
     at 
org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:314)
     at 
org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:425)
     at 
org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1088)
     ... 9 more
Caused by: org.apache.uima.util.InvalidXMLException: Import failed. 
Could not read from URL 
file:/C:/Users/gpits/ctakes/apache-ctakes-3.2.2/desc/ctakes-drug-ner/desc/analysis_engine/DrugCNP2LookupWindow.xml. 
(Descriptor: 
file:/C:/Users/gpits/ctakes/apache-ctakes-3.2.2/desc/ctakes-side-effect/desc/analysis_engine/LookupWindowAnnotator_sideEffect.xml)
     at 
org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.resolveDelegateAnalysisEngineImports(AnalysisEngineDescription_impl.java:812)
     at 
org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.resolveImports(AnalysisEngineDescription_impl.java:733)
     at 
org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.resolveDelegateAnalysisEngineImports(AnalysisEngineDescription_impl.java:827)
     at 
org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.resolveDelegateAnalysisEngineImports(AnalysisEngineDescription_impl.java:765)
     at 
org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.getDelegateAnalysisEngineSpecifiers(AnalysisEngineDescription_impl.java:193)
     at 
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:147)
     ... 15 more
Caused by: java.io.FileNotFoundException: 
C:\Users\gpits\ctakes\apache-ctakes-3.2.2\desc\ctakes-drug-ner\desc\analysis_engine\DrugCNP2LookupWindow.xml 
(The system cannot find the file specified)
     at java.io.FileInputStream.open(Native Method)
     at java.io.FileInputStream.<init>(Unknown Source)
     at java.io.FileInputStream.<init>(Unknown Source)
     at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
     at 
sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
     at org.apache.uima.util.XMLInputSource.<init>(XMLInputSource.java:120)
     at 
org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.resolveDelegateAnalysisEngineImports(AnalysisEngineDescription_impl.java:810)
     ... 20 more


Re: New user question on use of side effect component

Posted by Graham Pitson <gp...@alphalink.com.au>.
Pei,

Thanks for the info - it has been very helpful.

I've got things running now under CVD. Unfortunately the same pipeline 
errors on the CPE with a 'URI is not hierarchical'. I've decided to come 
back to that error later as I assume it is some difference in 
configuration between the two applications. I'm only running these as 
applications under windows 10.

Does the order of the SideEffectAnnotator matter in the pipeline?

Graham


On 15/12/2015 1:04 PM, Pei Chen wrote:
> Graham,
> The SideAffect descriptor looks like it's out of date.
> What I would do if I were you is use the default CPE and default
> aggregate from the clinical pipeline project and just add the
> SideAffectAnnotator into your pipeline. (instead of using the
> SideAffectAggregateTAE.xml)
>
> <delegateAnalysisEngine key="SideEffectAnnotator">
> <import location="SideEffectAnnotator.xml"/>
> </delegateAnalysisEngine>
> ....
> <node>SideEffectAnnotator</node>
>
> I think it's better to actually remove these example aggregate.xml's
> from individual projects as it is confusing and a pain to maintain.
> If anything, just have uimaFIT dynamically generate these at build
> time..  Just my 2 cents.
>
>


Re: New user question on use of side effect component

Posted by Pei Chen <ch...@apache.org>.
Graham,
The SideAffect descriptor looks like it's out of date.
What I would do if I were you is use the default CPE and default
aggregate from the clinical pipeline project and just add the
SideAffectAnnotator into your pipeline. (instead of using the
SideAffectAggregateTAE.xml)

<delegateAnalysisEngine key="SideEffectAnnotator">
<import location="SideEffectAnnotator.xml"/>
</delegateAnalysisEngine>
....
<node>SideEffectAnnotator</node>

I think it's better to actually remove these example aggregate.xml's
from individual projects as it is confusing and a pain to maintain.
If anything, just have uimaFIT dynamically generate these at build
time..  Just my 2 cents.

On Mon, Dec 14, 2015 at 7:03 PM, Graham Pitson <gp...@alphalink.com.au> wrote:
> Hi,
>
> I've installed cTakes and am hoping for some help getting started.
>
> I've downloaded and installed 3.2.2, including the umls dictionary. User
> name and password are setup and the user install demos are working for CVD
> and CPE.
>
> I'm trying to look at the side effect component run against some plain text
> files as a next step and having problems with  file not found for
> "apache-ctakes-3.2.2\desc\ctakes-drug-ner\desc\analysis_engine\DrugCNP2LookupWindow.xml
> ". Indeed, the file does not exist on my system
>
> Loading and running SideEffectCPE.xml in the CPE gives the error messages
> below as per the CPE log (apologies for the length but I've posted more
> rather than less of the log). I get similar messages in the CVD.
>
> So I'm wondering whether I'm actually missing the file or whether I haven't
> configured my system/request properly.
>
> Any help would be appreciated.
>
> Graham
>
>
>
> -------------------------------------log file
> follows-----------------------------------
>
> C:\Users\gpits\ctakes\apache-ctakes-3.2.2>cd
> C:\Users\gpits\ctakes\apache-ctakes-3.2.2
>
> C:\Users\gpits\ctakes\apache-ctakes-3.2.2>java -cp
> "C:\Users\gpits\ctakes\apache-ctakes-3.2.2/desc/;C:\Users\gpits\ctakes\apache-ctakes-3.2.2/resources/;C:\Users\gpits\ctakes\apache-ctakes-3.2.2/lib/*"
> -Dlog4j.configuration=file:/C:\Users\gpits\ctakes\apache-ctakes-3.2.2/config/log4j.xml
> -Xms512M -Xmx3g org.apache.uima.tools.cpm.CpmFrame
> Dec 15, 2015 10:41:21 AM java.util.prefs.WindowsPreferences <init>
> WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at
> root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
> org.apache.uima.resource.ResourceInitializationException: Initialization of
> CAS Processor with name "SideEffectSentenceAggregateTAE" failed.
>     at
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:83)
>     at
> org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine(UIMAFramework_impl.java:420)
>     at
> org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(UIMAFramework.java:864)
>     at org.apache.uima.tools.cpm.CpmPanel.startProcessing(CpmPanel.java:573)
>     at org.apache.uima.tools.cpm.CpmPanel.access$000(CpmPanel.java:105)
>     at org.apache.uima.tools.cpm.CpmPanel$1.run(CpmPanel.java:713)
> Caused by: org.apache.uima.resource.ResourceConfigurationException:
> Initialization of CAS Processor with name "SideEffectSentenceAggregateTAE"
> failed.
>     at
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1104)
>     at
> org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(CPEFactory.java:550)
>     at
> org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(BaseCPMImpl.java:253)
>     at
> org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(BaseCPMImpl.java:127)
>     at
> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:75)
>     ... 5 more
> Caused by: org.apache.uima.resource.ResourceInitializationException: Import
> failed.  Could not read from URL
> file:/C:/Users/gpits/ctakes/apache-ctakes-3.2.2/desc/ctakes-drug-ner/desc/analysis_engine/DrugCNP2LookupWindow.xml.
> (Descriptor:
> file:/C:/Users/gpits/ctakes/apache-ctakes-3.2.2/desc/ctakes-side-effect/desc/analysis_engine/LookupWindowAnnotator_sideEffect.xml)
>     at
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:159)
>     at
> org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
>     at
> org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
>     at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:269)
>     at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:314)
>     at
> org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:425)
>     at
> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1088)
>     ... 9 more
> Caused by: org.apache.uima.util.InvalidXMLException: Import failed. Could
> not read from URL
> file:/C:/Users/gpits/ctakes/apache-ctakes-3.2.2/desc/ctakes-drug-ner/desc/analysis_engine/DrugCNP2LookupWindow.xml.
> (Descriptor:
> file:/C:/Users/gpits/ctakes/apache-ctakes-3.2.2/desc/ctakes-side-effect/desc/analysis_engine/LookupWindowAnnotator_sideEffect.xml)
>     at
> org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.resolveDelegateAnalysisEngineImports(AnalysisEngineDescription_impl.java:812)
>     at
> org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.resolveImports(AnalysisEngineDescription_impl.java:733)
>     at
> org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.resolveDelegateAnalysisEngineImports(AnalysisEngineDescription_impl.java:827)
>     at
> org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.resolveDelegateAnalysisEngineImports(AnalysisEngineDescription_impl.java:765)
>     at
> org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.getDelegateAnalysisEngineSpecifiers(AnalysisEngineDescription_impl.java:193)
>     at
> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:147)
>     ... 15 more
> Caused by: java.io.FileNotFoundException:
> C:\Users\gpits\ctakes\apache-ctakes-3.2.2\desc\ctakes-drug-ner\desc\analysis_engine\DrugCNP2LookupWindow.xml
> (The system cannot find the file specified)
>     at java.io.FileInputStream.open(Native Method)
>     at java.io.FileInputStream.<init>(Unknown Source)
>     at java.io.FileInputStream.<init>(Unknown Source)
>     at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
>     at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown
> Source)
>     at org.apache.uima.util.XMLInputSource.<init>(XMLInputSource.java:120)
>     at
> org.apache.uima.analysis_engine.impl.AnalysisEngineDescription_impl.resolveDelegateAnalysisEngineImports(AnalysisEngineDescription_impl.java:810)
>     ... 20 more
>