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 07D4C10109 for ; Fri, 13 Dec 2013 19:20:11 +0000 (UTC) Received: (qmail 84653 invoked by uid 500); 13 Dec 2013 19:20:10 -0000 Delivered-To: apmail-ctakes-dev-archive@ctakes.apache.org Received: (qmail 84611 invoked by uid 500); 13 Dec 2013 19:20:10 -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 84603 invoked by uid 99); 13 Dec 2013 19:20:10 -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 19:20:10 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Pei.Chen@childrens.harvard.edu designates 134.174.13.18 as permitted sender) Received: from [134.174.13.18] (HELO mailsmtphv1.childrenshospital.org) (134.174.13.18) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Dec 2013 19:20:02 +0000 Received: from pps.filterd (mailsmtphv1.childrenshospital.org [127.0.0.1]) by mailsmtphv1.childrenshospital.org (8.14.5/8.14.5) with SMTP id rBDJFVom032118 for ; Fri, 13 Dec 2013 14:19:28 -0500 Received: from mailsmtp1.childrenshospital.org (mailsmtp1.childrenshospital.org [134.174.13.91]) by mailsmtphv1.childrenshospital.org with ESMTP id 1gpwf5a5es-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 13 Dec 2013 14:19:28 -0500 Received: from pps.filterd (mailsmtp1.childrenshospital.org [127.0.0.1]) by mailsmtp1.childrenshospital.org (8.14.5/8.14.5) with SMTP id rBDJC5CC006906 for ; Fri, 13 Dec 2013 14:19:27 -0500 Received: from smtpbdc1.chboston.org (smtpbdc1.chboston.org [10.20.18.104]) by mailsmtp1.childrenshospital.org with ESMTP id 1gqepjsu6q-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 13 Dec 2013 14:19:27 -0500 Received: from pps.filterd (smtpbdc1.chboston.org [127.0.0.1]) by smtpbdc1.chboston.org (8.14.5/8.14.5) with SMTP id rBDJFTq3007768 for ; Fri, 13 Dec 2013 14:19:26 -0500 Received: from chexhubcas3.chboston.org (chexhubcas3.chboston.org [10.20.50.91]) by smtpbdc1.chboston.org with ESMTP id 1gpwf1yqku-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Fri, 13 Dec 2013 14:19:26 -0500 Received: from CHEXMBX1A.CHBOSTON.ORG ([fe80::3c05:8ca9:55a6:f320]) by CHEXHUBCAS3.CHBOSTON.ORG ([::1]) with mapi id 14.02.0342.003; Fri, 13 Dec 2013 14:19:26 -0500 From: "Chen, Pei" To: "dev@ctakes.apache.org" Subject: RE: scala and groovy Thread-Topic: scala and groovy Thread-Index: Ac74IOuNXdxjeltdSa2dureV5gBKnQAAgEuQAABTc9AABDcRgAAAuKnw Date: Fri, 13 Dec 2013 19:19:25 +0000 Message-ID: <924DE05C19409B438EB81DE683A942D91061BA32@CHEXMBX1A.CHBOSTON.ORG> References: <996FC801C05DF64A84246A106FACACD0212F50@MSGPEXCHA08A.mfad.mfroot.org> <924DE05C19409B438EB81DE683A942D91061B7C2@CHEXMBX1A.CHBOSTON.ORG> <996FC801C05DF64A84246A106FACACD0212FCE@MSGPEXCHA08A.mfad.mfroot.org> <996FC801C05DF64A84246A106FACACD02130AE@MSGPEXCHA08A.mfad.mfroot.org> In-Reply-To: <996FC801C05DF64A84246A106FACACD02130AE@MSGPEXCHA08A.mfad.mfroot.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.7.2.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87,1.0.14,0.0.0000 definitions=2013-12-13_05:2013-12-12,2013-12-13,1970-01-01 signatures=0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87,1.0.14,0.0.0000 definitions=2013-12-13_05:2013-12-12,2013-12-13,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1305240000 definitions=main-1312130146 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87,1.0.14,0.0.0000 definitions=2013-12-13_05:2013-12-12,2013-12-13,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1305240000 definitions=main-1312130148 X-Virus-Checked: Checked by ClamAV on apache.org James, I wonder why the transitive dependencies didn't resolve that automatically = (I think scala is in maven central) just like the other jars... i.e. why do we need to have it manually added to the classpath? > -----Original Message----- > From: Masanz, James J. [mailto:Masanz.James@mayo.edu] > Sent: Friday, December 13, 2013 2:02 PM > To: 'dev@ctakes.apache.org' > Subject: RE: scala and groovy >=20 >=20 > Sort of good news on the scala front -- after I added the complete filena= me > for the jars to the rootLoader statements (I had left out the "version" p= art of > the jar names), using scala now works. >=20 > jarName =3D "scala-library-2.9.0.jar"; > this.class.classLoader.rootLoader.addURL( new URL(libLocation + jarName) = ); > jarName =3D "sbinary_2.9.0-0.4.0.jar"; > this.class.classLoader.rootLoader.addURL( new URL(libLocation + jarName) = ); >=20 > (not ready to post a full solution yet - pipeline did not run to completi= on, but > at least I'm on to the next issue now) >=20 > -- James >=20 > -----Original Message----- > From: dev-return-2314-Masanz.James=3Dmayo.edu@ctakes.apache.org > [mailto:dev-return-2314-Masanz.James=3Dmayo.edu@ctakes.apache.org] On > Behalf Of Masanz, James J. > Sent: Friday, December 13, 2013 10:59 AM > To: 'dev@ctakes.apache.org' > Subject: RE: scala and groovy >=20 > 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.groo= vy > also now contains a desc subdirectory and an org subdirectory. > mkdir inputDir > groovy cTAKES-with-resources.groovy inputDir >=20 > Thanks Pei! >=20 > -----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 >=20 > James, > Would it be possible to also attach your script? I can try to replicate = it here... > --Pei >=20 > > -----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 > > > > > > 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=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'), > > > > 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.(ScopeParser.java:22= ) > > at > > org.apache.ctakes.assertion.medfacts.AssertionAnalysisEngine.initializ > > e(Ass > > ertionAnalysisEngine.java:121) > > at > > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.init > > ialize > > AnalysisComponent(PrimitiveAnalysisEngine_impl.java:250) > > at > > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.init > > ialize > > (PrimitiveAnalysisEngine_impl.java:156) > > at > > > org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(Analys > > i > > 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.init > > AS > > B(AggregateAnalysisEngine_impl.java:431) > > at > > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.init > > ializ > > eAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375) > > at > > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.init > > ializ > > e(AggregateAnalysisEngine_impl.java:185) > > at > > > org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(Analys > > i > > 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.init > > AS > > B(AggregateAnalysisEngine_impl.java:431) > > at > > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.init > > ializ > > eAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375) > > at > > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.init > > ializ > > e(AggregateAnalysisEngine_impl.java:185) > > at > > > org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(Analys > > i > > 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.init > > AS > > B(AggregateAnalysisEngine_impl.java:431) > > at > > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.init > > ializ > > eAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375) > > at > > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.init > > ializ > > e(AggregateAnalysisEngine_impl.java:185) > > at > > org.uimafit.factory.AnalysisEngineFactory.createAggregate(AnalysisEngi > > neFa > > ctory.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