Return-Path: X-Original-To: apmail-ctakes-dev-archive@www.apache.org Delivered-To: apmail-ctakes-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4BA5E10AE7 for ; Fri, 13 Dec 2013 16:59:22 +0000 (UTC) Received: (qmail 70571 invoked by uid 500); 13 Dec 2013 16:59:20 -0000 Delivered-To: apmail-ctakes-dev-archive@ctakes.apache.org Received: (qmail 70284 invoked by uid 500); 13 Dec 2013 16:59:20 -0000 Mailing-List: contact dev-help@ctakes.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ctakes.apache.org Delivered-To: mailing list dev@ctakes.apache.org Received: (qmail 70000 invoked by uid 99); 13 Dec 2013 16:59:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Dec 2013 16:59:18 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [129.176.212.47] (HELO mail10.mayo.edu) (129.176.212.47) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Dec 2013 16:59:09 +0000 Received: from unknown (HELO mail10.mayo.edu) ([10.146.65.139]) by ironport10-dlp.mayo.edu with ESMTP; 13 Dec 2013 10:58:47 -0600 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgMFAJQ7q1KBsNQ1/2dsb2JhbABZgwqBDaZikXuBJBZ0giUBAQEEOksEAgEIEQQBAQsUCQcyFAkIAQEEEwiHfAXEbYYzF45kOAaDHYETBKoqgyqCKg Received: from mhro1a.mayo.edu ([129.176.212.53]) by ironport10.mayo.edu with ESMTP; 13 Dec 2013 10:58:47 -0600 Received: from MSGPEXCEI06A.mfad.mfroot.org (msgpexcei06a.mayo.edu [129.176.249.167]) by mhro1a.mayo.edu with ESMTP id BT-MMP-876262 for dev@ctakes.apache.org; Fri, 13 Dec 2013 10:58:46 -0600 Received: from MSGPEXCHA21B.mfad.mfroot.org (129.176.249.224) by MSGPEXCEI06A.mfad.mfroot.org (129.176.249.167) with Microsoft SMTP Server (TLS) id 14.3.158.1; Fri, 13 Dec 2013 10:58:46 -0600 Received: from MSGPEXCHA08A.mfad.mfroot.org ([169.254.11.239]) by MSGPEXCHA21B.mfad.mfroot.org ([169.254.1.3]) with mapi id 14.03.0158.001; Fri, 13 Dec 2013 10:58:46 -0600 From: "Masanz, James J." To: "'dev@ctakes.apache.org'" Subject: RE: scala and groovy Thread-Topic: scala and groovy Thread-Index: Ac74IOuNXdxjeltdSa2dureV5gBKnQAAgEuQAABTc9A= Date: Fri, 13 Dec 2013 16:58:45 +0000 Message-ID: <996FC801C05DF64A84246A106FACACD0212FCE@MSGPEXCHA08A.mfad.mfroot.org> References: <996FC801C05DF64A84246A106FACACD0212F50@MSGPEXCHA08A.mfad.mfroot.org> <924DE05C19409B438EB81DE683A942D91061B7C2@CHEXMBX1A.CHBOSTON.ORG> In-Reply-To: <924DE05C19409B438EB81DE683A942D91061B7C2@CHEXMBX1A.CHBOSTON.ORG> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.209.26] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Virus-Checked: Checked by ClamAV on apache.org That would be great if you could try to replicate. Check out ctakes/sandbox/groovy/cTAKES-with-resources.groovy Download the two zips from ctakes/sandbox/groovy-temp-resources/ Extract them so that the directory containing cTAKES-with-resources.groovy= also now contains a desc subdirectory and an org subdirectory. mkdir inputDir groovy cTAKES-with-resources.groovy inputDir Thanks Pei! -----Original Message----- From: dev-return-2313-Masanz.James=3Dmayo.edu@ctakes.apache.org [mailto:dev= -return-2313-Masanz.James=3Dmayo.edu@ctakes.apache.org] On Behalf Of Chen, = Pei Sent: Friday, December 13, 2013 10:48 AM To: dev@ctakes.apache.org Subject: RE: scala and groovy James, Would it be possible to also attach your script? I can try to replicate it= here... --Pei > -----Original Message----- > From: Masanz, James J. [mailto:Masanz.James@mayo.edu] > Sent: Friday, December 13, 2013 11:34 AM > To: 'dev@ctakes.apache.org' > Subject: scala and groovy >=20 >=20 > I'm still working on getting the clinical-pipeline > (AggregatePlaintextUMLSProcessor) to run from groovy, using the > parser.groovy as a starting point >=20 > 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 >=20 > Another issue is some of the jars that are used by the assertion componen= t: > 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 >=20 > I download those also separately from SVN and add them using statements > like this: > this.class.classLoader.rootLoader.addURL( new URL(libLocation + jarName) = ); >=20 > The bigger issue is the following > I was getting an error about scala, so I added the following to the Grape= s > annotation in my groovy script @Grab(group=3D'org.scala-lang', module=3D'= scala- > library', version=3D'2.9.0'), @Grab(group=3D'org.scala-tools.sbinary', > module=3D'sbinary_2.9.0', version=3D'0.4.0'), >=20 > 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. >=20 > 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.(ScopeParser.java:22= ) > at > org.apache.ctakes.assertion.medfacts.AssertionAnalysisEngine.initialize(A= ss > ertionAnalysisEngine.java:121) > at > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initial= ize > AnalysisComponent(PrimitiveAnalysisEngine_impl.java:250) > at > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initial= ize > (PrimitiveAnalysisEngine_impl.java:156) > at > org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(Analysi > sEngineFactory_impl.java:94) > at > org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(C > ompositeResourceFactory_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:25 > 4) > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initAS > B(AggregateAnalysisEngine_impl.java:431) > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initial= iz > eAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375) > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initial= iz > e(AggregateAnalysisEngine_impl.java:185) > at > org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(Analysi > sEngineFactory_impl.java:94) > at > org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(C > ompositeResourceFactory_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:25 > 4) > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initAS > B(AggregateAnalysisEngine_impl.java:431) > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initial= iz > eAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375) > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initial= iz > e(AggregateAnalysisEngine_impl.java:185) > at > org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(Analysi > sEngineFactory_impl.java:94) > at > org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(C > ompositeResourceFactory_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:25 > 4) > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initAS > B(AggregateAnalysisEngine_impl.java:431) > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initial= iz > eAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375) > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initial= iz > e(AggregateAnalysisEngine_impl.java:185) > at > org.uimafit.factory.AnalysisEngineFactory.createAggregate(AnalysisEngineF= a > ctory.java:505) > at > org.uimafit.factory.AggregateBuilder.createAggregate(AggregateBuilder.jav= a > :200) > at org.uimafit.factory.AggregateBuilder$createAggregate.call(Unkn= own > Source) > at cTAKES-with-resources.run(cTAKES-with-resources.groovy:365) > Caused by: java.lang.ClassNotFoundException: scala.ScalaObject > ... 32 more