ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RANGA CHANDRA GUDIVADA <chandhragupta...@hotmail.com>
Subject RE: Error while running DrugMentionAnnotator.xml
Date Thu, 13 Aug 2015 21:20:41 GMT

Pei, Thanks for your response and at the moment I am not
really building any complex pipelines. I am merely running the “DrugMentionAnnotator.xml”
from the standalone “runctakesCVD.bat”.  The
original descriptor “DrugMentionAnnotator.xml” file did had the following when
I downloaded it.



<typeSystemDescription> 

<imports> 

<import
name="org.apache.ctakes.drugner.types.TypeSystem"/> 

</imports> 

</typeSystemDescription> 

 
Here I tried to outline the entire workflow that I did
before posting my first error message in the forum, 

 



Step1:  Ran the out-of-box
“DrugMentionAnnotator.xml” and got the below error, As I mentioned before, the
downloaded descriptor did had the above xml snippet, but still threw this error, 


 

Caused by: org.apache.uima.cas.CASRuntimeException: JCas
type "org.apache.ctakes.typesystem.type.textspan.Segment" used in
Java code,  but was not declared in the
XML type descriptor.

                at
org.apache.uima.jcas.impl.JCasImpl.getType(JCasImpl.java:412)

                at
org.apache.uima.jcas.impl.JCasImpl.getCasType(JCasImpl.java:436)

                at
org.apache.uima.jcas.impl.JFSIndexRepositoryImpl.getAnnotationIndex(JFSIndexRepositoryImpl.java:80)

                at
org.apache.ctakes.drugner.ae.DrugMentionAnnotator.process(DrugMentionAnnotator.java:236)



 

 

 

Step 2: By looking at various user posts in the forum, I found
that adding the following to the “DrugMentionAnnotator.xml” should solve the
issue

 

<imports>

<import name="org.apache.ctakes.typesystem.types.TypeSystem"/>

</imports>

 

 

 

After adding , the <typeSystemDescription>  was changed to below


 

<typeSystemDescription>    

      
<imports>

                 <import
name="org.apache.ctakes.drugner.types.TypeSystem"/>

      
</imports>

        

     
<imports>

                  <import
name="org.apache.ctakes.typesystem.types.TypeSystem"/>

                </imports>

</typeSystemDescription>



 

Step 3: Ran the ““DrugMentionAnnotator.xml” again with
the changes and got the below error. I can see that the earlier error was by
passed but got a new one

 

Caused by: org.apache.uima.cas.CASRuntimeException: JCas
type "org.apache.ctakes.drugner.type.FrequencyAnnotation" used in
Java code,  but was not declared in the
XML type descriptor.

                at
org.apache.uima.jcas.impl.JCasImpl.getType(JCasImpl.java:412)

                at
org.apache.uima.jcas.impl.JCasImpl.getCasType(JCasImpl.java:436)

                at
org.apache.uima.jcas.impl.JFSIndexRepositoryImpl.getAnnotationIndex(JFSIndexRepositoryImpl.java:80)

                at
org.apache.ctakes.drugner.ae.DrugMentionAnnotator.removeAnnotations(DrugMentionAnnotator.java:306)

                at
org.apache.ctakes.drugner.ae.DrugMentionAnnotator.removeDrugNerTypes(DrugMentionAnnotator.java:299)

                at
org.apache.ctakes.drugner.ae.DrugMentionAnnotator.process(DrugMentionAnnotator.java:260)



 

 

Not sure what’s happening here. Was wondering anyone else
had similar situations to deal with. 

Any help would be greatly appreciated.
ThanksChandra









> Date: Mon, 10 Aug 2015 13:37:13 -0400
> Subject: Re: Error while running DrugMentionAnnotator.xml
> From: chenpei@apache.org
> To: dev@ctakes.apache.org
> 
> Chandra,
> How are you wiring up the DrugMentionAnnotator?
> The default AggregatePlaintextFastUMLSProcessor.xml should already
> have the Drug NER included.
> http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-clinical-pipeline/desc/analysis_engine/AggregatePlaintextFastUMLSProcessor.xml
> 
> In general, you'll most likely need to something like the below if you
> have a custom/modified pipeline:
> 
> <typeSystemDescription>
>        <imports>
>          <import name="org.apache.ctakes.drugner.types.TypeSystem"/>
>        </imports>
> </typeSystemDescription>
> 
> Related Thread:
> http://mail-archives.apache.org/mod_mbox/ctakes-user/201403.mbox/%3CCAPqz87oUZ=hPzc_Fo_ZLaEf3PVQcm9xSYuMs15iyMgapsxX9gg@mail.gmail.com%3E
> 
> If you're using uimaFIT to wire your pipeline together, I would highly
> recommend using the Automatic Type System Discovery.
> 
> Hope that helps.
> 
> 
> On Sat, Aug 8, 2015 at 12:12 PM, RANGA CHANDRA GUDIVADA
> <chandhragupta_in@hotmail.com> wrote:
> > Hello All,
> >
> > I am getting the below error while trying to run the analysis engine "DrugMentionAnnotator.xml"
from user install CVD.  Please let me know if anyone has similar issues and were able to successfully
fix it.
> >
> > Ctakes Version used : apache-ctakes-3.2.2
> > Ctakes Resources : ctakes-resources-3.2.1.1-bin
> >
> >
> >
> > Caused by: org.apache.uima.cas.CASRuntimeException: JCas type "org.apache.ctakes.drugner.type.FrequencyAnnotation"
used in Java code,  but was not declared in the XML type descriptor.
> >     at org.apache.uima.jcas.impl.JCasImpl.getType(JCasImpl.java:412)
> >     at org.apache.uima.jcas.impl.JCasImpl.getCasType(JCasImpl.java:436)
> >     at org.apache.uima.jcas.impl.JFSIndexRepositoryImpl.getAnnotationIndex(JFSIndexRepositoryImpl.java:80)
> >     at org.apache.ctakes.drugner.ae.DrugMentionAnnotator.removeAnnotations(DrugMentionAnnotator.java:306)
> >     at org.apache.ctakes.drugner.ae.DrugMentionAnnotator.removeDrugNerTypes(DrugMentionAnnotator.java:299)
> >     at org.apache.ctakes.drugner.ae.DrugMentionAnnotator.process(DrugMentionAnnotator.java:260)
> >     ... 45 more
> >
> > Thanks
> > Chandra
> >
> >
> >
> >
> >
> >
> >
> >
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message