ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Pei" <Pei.C...@childrens.harvard.edu>
Subject RE: UIMAFit and cTakes
Date Tue, 16 Apr 2013 16:46:07 GMT
[-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 yesterday 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 so, 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 the existing pom.xml and add in any
of the dependencies there.  If you include any existing module as a dependency, it should
automagically handle any resources/models without having to manually maintaining a lib directory.
 Please let us know if this works out for you or if you need more input in this space.

2) What should be descPath in following code ( I figured that this should be 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 could be changed/reused
if possible.
I'll let some of the uimaFIT experts here chime in as to best use it for your 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/src/test/java/org/apache/ctakes/dependency/parser/ae/util/TestClearNLPAnalysisEngines.java
[2] http://svn.apache.org/repos/asf/ctakes/trunk/ctakes-temporal/src/main/java/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 <girinambari@gmail.com<mailto:girinambari@gmail.com>>
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 ctakes lib to my eclipse
project --->Java build path--->libraries.

Sample code I have is (This is compiling fine, but runtime issue due to path is not valid
for AnalysisEngineDescription):
TypeSystemDescription typeSystemDescription = TypeSystemDescriptionFactory
.createTypeSystemDescription();
List<AnalysisEngineDescription> engines = new ArrayList<AnalysisEngineDescription>();
List<String> componentNames = new ArrayList<String>();

AnalysisEngineDescription engine = AnalysisEngineFactory
.createAnalysisEngineDescription("com.resources.AggregatePlaintextProcessor", "", "");
engines.add(engine);
AnalysisEngine aggregateAE = 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 so, how? Attached
screenshot of the jars I have in build path.

2) What should be descPath in following code ( I figured that this should be 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 = AnalysisEngineFactory
.createAnalysisEngineDescription("descPath", "", "");

any inputs would be really appreciated.

Thanks for your time and help.

Thank you,
Giri




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