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 BBA80F84E for ; Tue, 16 Apr 2013 18:41:06 +0000 (UTC) Received: (qmail 49703 invoked by uid 500); 16 Apr 2013 18:41:06 -0000 Delivered-To: apmail-ctakes-dev-archive@ctakes.apache.org Received: (qmail 49628 invoked by uid 500); 16 Apr 2013 18:41:06 -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 49618 invoked by uid 99); 16 Apr 2013 18:41:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Apr 2013 18:41:06 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Pei.Chen@childrens.harvard.edu designates 134.174.20.73 as permitted sender) Received: from [134.174.20.73] (HELO mailsmtp3.childrenshospital.org) (134.174.20.73) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Apr 2013 18:40:58 +0000 Received: from pps.filterd (mailsmtp3.childrenshospital.org [127.0.0.1]) by mailsmtp3.childrenshospital.org (8.14.5/8.14.5) with SMTP id r3GIXJud015422; Tue, 16 Apr 2013 14:40:35 -0400 Received: from smtpndc2.chboston.org (smtpndc2.chboston.org [10.20.50.105]) by mailsmtp3.childrenshospital.org with ESMTP id 1brpjn0ttt-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Tue, 16 Apr 2013 14:40:35 -0400 Received: from pps.filterd (smtpndc2.chboston.org [127.0.0.1]) by smtpndc2.chboston.org (8.14.5/8.14.5) with SMTP id r3GIeC2f013973; Tue, 16 Apr 2013 14:40:35 -0400 Received: from chexhubcas1.chboston.org (internal-ndc-nat-v1260.tch.harvard.edu [10.20.50.4]) by smtpndc2.chboston.org with ESMTP id 1bp1suuaee-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 16 Apr 2013 14:40:35 -0400 Received: from CHEXMBX1A.CHBOSTON.ORG ([fe80::3c05:8ca9:55a6:f320]) by CHEXHUBCAS1.CHBOSTON.ORG ([::1]) with mapi id 14.02.0309.002; Tue, 16 Apr 2013 14:40:35 -0400 From: "Chen, Pei" To: "girinambari@gmail.com" CC: "dev@ctakes.apache.org" Subject: RE: UIMAFit and cTakes Thread-Topic: UIMAFit and cTakes Thread-Index: AQHOOVfjgsAvANmVeEuCNJ1qPOtYCpjXn5yAgAFs/GCAAGXZAP//vdVg Date: Tue, 16 Apr 2013 18:40:34 +0000 Message-ID: <924DE05C19409B438EB81DE683A942D9104D820F@CHEXMBX1A.CHBOSTON.ORG> References: <924DE05C19409B438EB81DE683A942D9104D810A@CHEXMBX1A.CHBOSTON.ORG> In-Reply-To: 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: multipart/alternative; boundary="_000_924DE05C19409B438EB81DE683A942D9104D820FCHEXMBX1ACHBOST_" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8626,1.0.431,0.0.0000 definitions=2013-04-16_07:2013-04-16,2013-04-16,1970-01-01 signatures=0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8626,1.0.431,0.0.0000 definitions=2013-04-16_07:2013-04-16,2013-04-16,1970-01-01 signatures=0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_924DE05C19409B438EB81DE683A942D9104D820FCHEXMBX1ACHBOST_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Giri, The NPE is due to the fact that the component can't find the model file (It= should probably give a more friendly error message though :).) In eclipse/mvn, ensure that you have the ctakes-dependency-parser-res and a= ny other resource project included in your dependencies. Essentially, what it will need is everything in src/main/resources in the c= lasspath. --Pei From: giri vara prasad nambari [mailto:girinambari@gmail.com] Sent: Tuesday, April 16, 2013 2:36 PM To: user Cc: dev@ctakes.apache.org Subject: Re: UIMAFit and cTakes Hi Pei, It was really tragic incident. My thoughts and prayers are with Boston. Regarding the UIMAFit and analysis engine issues, I did some trail/error an= d was able to successfully get Clinical-pipe-line --->Analysisi Engine--->D= escriptors get loaded (after that Richard from UIMAFit chimed in suggested = alternative code to get this run). But when I use this alternative code (shown below), I am getting ctakes Nul= lPointerException. Any input on this issue? AnalysisEngineDescription aaeDesc =3D AnalysisEngineFactory.createAggrega= te(descPath) ; AnalysisEngine aee =3D AnalysisEngineFactory.createAggregate(aaeDesc); Getting following Exception: WARNING: The aggregate text analysis engine "AggregatePlaintextProcessor" h= as declared the parameter , but has not declared any overrides.This usage i= s deprecated. org.apache.uima.resource.ResourceInitializationException: Initialization of= annotator class "org.apache.ctakes.dependency.parser.ae.ClearParserDepende= ncyParserAE" failed. (Descriptor: file:/C:/workspace/DataAnalyisEngine/res= ources/ctakes-dependency-parser/desc/analysis_engine/ClearParserDependencyP= arserAE.xml) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_i= mpl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:252) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_i= mpl.initialize(PrimitiveAnalysisEngine_impl.java:156) at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResourc= e(AnalysisEngineFactory_impl.java:94) at org.apache.uima.impl.CompositeResourceFactory_impl.produceReso= urce(CompositeResourceFactory_impl.java:62) at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.ja= va:269) at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramew= ork.java:387) at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_im= pl.java:254) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_i= mpl.initASB(AggregateAnalysisEngine_impl.java:431) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_i= mpl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:375= ) at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_i= mpl.initialize(AggregateAnalysisEngine_impl.java:185) at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResourc= e(AnalysisEngineFactory_impl.java:94) at org.apache.uima.impl.CompositeResourceFactory_impl.produceReso= urce(CompositeResourceFactory_impl.java:62) at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.ja= va:269) at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.ja= va:314) at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramew= ork.java:425) at org.uimafit.factory.AnalysisEngineFactory.createAggregate(Anal= ysisEngineFactory.java:424) at com.dae.test.JcasParserTest.main(JcasParserTest.java:28) Caused by: java.lang.NullPointerException at clear.morph.MorphEnAnalyzer.(MorphEnAnalyzer.java:111) at org.apache.ctakes.dependency.parser.ae.ClearParserDependencyPa= rserAE.initialize(ClearParserDependencyParserAE.java:136) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_i= mpl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:250) ... 16 more Here is the thread which lists the discussion I had with Richard from UIMAF= it. https://groups.google.com/forum/?fromgroups#!topic/uimafit-users/yI0NT2HynU= 0 I hope this will be last hurdle to overcome to get my code running as java = client. I am allowed to use Maven (and this is eclipse project), but I don't have f= irst hand experience with it yet, so prefer to hold until one level of flow= is ready, which gives me comfort to work on improvements. Thank you, Giri On Tue, Apr 16, 2013 at 12:46 PM, Chen, Pei > wrote: [-user bcc, +dev as this is probably geared towards developers] Hi Giri, My apologies- a lot of us in the Boston area were out of the office yesterd= ay for the holiday and also the tragic events that have transpired here. 1) Do I need to add ctakes resources some where in my eclipse project? If s= o, how? Attached screenshot of the jars I have in build path. Maven is excellent for handling and resolving dependencies. If this is an = eclipse project, I would suggest creating a mvn project or cloning one of t= he existing pom.xml and add in any of the dependencies there. If you inclu= de any existing module as a dependency, it should automagically handle any = resources/models without having to manually maintaining a lib directory. P= lease let us know if this works out for you or if you need more input in th= is space. 2) What should be descPath in following code ( I figured that this should b= e path for whatever the AE (like ctakes-clinical-pipeline) we would like to= use, but I am not clear on how could I get this desc into my project. One way is to pass in any paths as configuration parameters so that it coul= d be changed/reused if possible. I'll let some of the uimaFIT experts here chime in as to best use it for yo= ur use-case. But the API is capable of creating pipelines programmatically= , as well as reading in a xml descriptor (Either Aggregate or Primitive). Some examples include that I could think of on the top of my head: [1] http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-dependency-parser/s= rc/test/java/org/apache/ctakes/dependency/parser/ae/util/TestClearNLPAnalys= isEngines.java [2] http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-temporal/src/main/j= ava/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java I hope that helps. --Pei From: giri vara prasad nambari [mailto:girinambari@gmail.com] Sent: Monday, April 15, 2013 10:45 AM To: dev@ctakes.apache.org; user Subject: Re: UIMAFit and cTakes Hi Team, Good morning! Any inputs on this issue? Thank you, Giri On Sun, Apr 14, 2013 at 5:33 PM, giri vara prasad nambari > wrote: Hi Community, I am trying to write a simple java client program using UIMAFit and ctakes. I have added all jars come with UIMAFit and ctakes specific jars from ctake= s lib to my eclipse project --->Java build path--->libraries. Sample code I have is (This is compiling fine, but runtime issue due to pat= h is not valid for AnalysisEngineDescription): TypeSystemDescription typeSystemDescription =3D TypeSystemDescriptionFactor= y .createTypeSystemDescription(); List engines =3D new ArrayList(); List componentNames =3D new ArrayList(); AnalysisEngineDescription engine =3D AnalysisEngineFactory .createAnalysisEngineDescription("com.resources.AggregatePlaintextProcessor= ", "", ""); engines.add(engine); AnalysisEngine aggregateAE =3D AnalysisEngineFactory.createAggregate( engines, componentNames, typeSystemDescription, null, new SofaMapping[0]); One thing I am little confused here is, 1) Do I need to add ctakes resources some where in my eclipse project? If s= o, how? Attached screenshot of the jars I have in build path. 2) What should be descPath in following code ( I figured that this should b= e path for whatever the AE (like ctakes-clinical-pipeline) we would like to= use, but I am not clear on how could I get this desc into my project. AnalysisEngineDescription engine =3D AnalysisEngineFactory .createAnalysisEngineDescription("descPath", "", ""); any inputs would be really appreciated. Thanks for your time and help. Thank you, Giri --_000_924DE05C19409B438EB81DE683A942D9104D820FCHEXMBX1ACHBOST_--