Hi,

I'm hoping for some more insights into using the side effect annotator.

As per Pie Chen's suggestion I've added the side effect annotator to the default AggregatePlaintextFastUMLSProcessor. The xml changes are shown below.

Initially I was getting 'URI is not hierarchical' errors. After some searching I thought this might be due to a missing dictionary file and added sideEffect_dictionary.txt at 'apache-ctakes-3.2.2\resources\org\apache\ctakes\sideeffect\lookup'. This stopped the URI errors. I put some dummy content in the dictionary (shown below; using the full content from here didn't help either - https://svn.apache.org/repos/asf/ctakes/trunk/ctakes-side-effect-res/src/main/resources/org/apache/ctakes/sideeffect/lookup/sideEffect_dictionary.txt).

Now as per the log files, I'm getting null pointer exceptions within sideEffectAnnotator.java - at 2 different locations as shown below. Getting an exception is dependent on the text analysed: 'Seen today. On tamoxifen 20 mg daily which caused headaches.' causes an exception. 'Seen today. On tamoxifen 20 mg daily which caused something.' does not (of course there is no clinical finding in the second text).

Given that others are using the side effect annotator, I'm guessing this is some kind of issue with my configuration/dictionary and would appreciate any advice.

I'm running the latest version of cTakes 'as is'.

Thanks in advance.


Graham Pitson

-----------------------------AggregatePlaintextFastUMLSProcessor.xml---------------------------------------------

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

        <node>ConstituencyParser</node>

        <node>SideEffectAnnotator</node>

        <!-- <node>AssertionAnnotator</node> -->
        <!-- <node>StatusAnnotator</node> -->
        <!-- <node>NegationAnnotator</node> -->
        <node>GenericCleartkAnalysisEngine</node>

-------------------------test text-------------------------------

'Seen today. On tamoxifen 20 mg daily which caused headaches.'

-------------------------------------------error logs (2 different exception locations)-----------------------------------------------------------


17/12/15 6:21:24 AM - 14: org.apache.uima.tools.cvd.MainFrame.handleException(526): SEVERE: Annotator processing failed. org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing failed. at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:391) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:296) at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:567) at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:409) at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:342) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:267) at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267) at org.apache.uima.tools.cvd.MainFrame.internalRunAE(MainFrame.java:1526)
    at org.apache.uima.tools.cvd.MainFrame.runAE(MainFrame.java:429)
at org.apache.uima.tools.cvd.control.AnnotatorRerunEventHandler.actionPerformed(AnnotatorRerunEventHandler.java:40)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.apache.ctakes.sideeffect.ae.SideEffectAnnotator.isInAllergySection(SideEffectAnnotator.java:759) at org.apache.ctakes.sideeffect.ae.SideEffectAnnotator.getSideEffectsWithPrioritizedRule(SideEffectAnnotator.java:342) at org.apache.ctakes.sideeffect.ae.SideEffectAnnotator.process(SideEffectAnnotator.java:180) at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:375)
    ... 47 more


    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.apache.ctakes.sideeffect.ae.SideEffectAnnotator.getPotentialSideEffects(SideEffectAnnotator.java:296) at org.apache.ctakes.sideeffect.ae.SideEffectAnnotator.process(SideEffectAnnotator.java:177) at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:375)
    ... 47 more

--------------------------------------------dummy dictionary----------------------------------------------------

//FORMAT: generic drug|brand drug|side effect1, side effect2,...
Tamoxifen|Nolvadex,Tam|Hot flushes, nausea, endometrial cancer


Reply via email to