ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Masanz, James J." <Masanz.Ja...@mayo.edu>
Subject scala and groovy
Date Fri, 13 Dec 2013 16:32:44 GMT

I'm still working on getting the clinical-pipeline (AggregatePlaintextUMLSProcessor) to run
from groovy, using the parser.groovy as a starting point

A side issue to the main point of this post:
The first  issue is already marked as a TODO in parser.groovy -- about downloading models.
I am working around that for now by programmatically downloading all models needed and the
LookupDesc_Db.xml from SVN in the same way parser.groovy downloads the sentence detector model,
because things within the ctakes-*-res jars aren't being found by org.apache.ctakes.core.resource.FileLocator#getAsStream

Another issue is some of the jars that are used by the assertion component:
med-facts-i2b2-1.2-SNAPSHOT.jar
med-facts-zoner-1.1.jar
jcarafe-ext_2.9.1-0.9.8.3.RC4.jar
jcarafe-core_2.9.1-0.9.8.3.RC4.jar

I download those also separately from SVN and add them using statements like this:
this.class.classLoader.rootLoader.addURL( new URL(libLocation + jarName) );

The bigger issue is the following
I was getting an error about scala, so I added the following to the Grapes annotation in my
groovy script
@Grab(group='org.scala-lang', module='scala-library', version='2.9.0'),
@Grab(group='org.scala-tools.sbinary', module='sbinary_2.9.0', version='0.4.0'),

Those grapes now appear in my grapes repo. But I am getting the following error, and I don't
know why ScopeParser cannot "see" scala.ScalaObject which I believe is defined in one of the
scala jars that I added to the rootLoader as I described above.

scope model: /C:/usr/meTAKES/using-groovy/org/apache/ctakes/assertion/models/scope.model
Caught: java.lang.NoClassDefFoundError: scala/ScalaObject
java.lang.NoClassDefFoundError: scala/ScalaObject
        at org.mitre.medfacts.i2b2.annotation.ScopeParser.<init>(ScopeParser.java:22)
        at org.apache.ctakes.assertion.medfacts.AssertionAnalysisEngine.initialize(AssertionAnalysisEngine.java:121)
        at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:250)
        at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:156)
        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.produceAnalysisEngine(UIMAFramework.java:387)
        at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:254)
        at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:431)
        at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375)
        at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:185)
        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.produceAnalysisEngine(UIMAFramework.java:387)
        at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:254)
        at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:431)
        at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375)
        at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:185)
        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.produceAnalysisEngine(UIMAFramework.java:387)
        at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:254)
        at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:431)
        at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375)
        at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:185)
        at org.uimafit.factory.AnalysisEngineFactory.createAggregate(AnalysisEngineFactory.java:505)
        at org.uimafit.factory.AggregateBuilder.createAggregate(AggregateBuilder.java:200)
        at org.uimafit.factory.AggregateBuilder$createAggregate.call(Unknown Source)
        at cTAKES-with-resources.run(cTAKES-with-resources.groovy:365)
Caused by: java.lang.ClassNotFoundException: scala.ScalaObject
        ... 32 more

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message