You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ctakes.apache.org by Prakhar Gaur <pr...@infosys.com> on 2018/01/08 06:21:17 UTC
Errors in Invoking Degree-of-Text-Relation Annotator From Java
Hello and happy new year wishes to Everyone,
Config: cTakes 4.0 integrated with my Java project on Windows environment.
I am want to create an 'AnalysisEngine' with DegreeOfTextRelation builder added programmatically in Java.
For above I have tried two approaches both unsuccessfully:
A)
Below are the two lines of code I have added to AnalysisEngineDescription for the above mentioned purpose.
* AnalysisEngineFactory.createPrimitiveDescription(DegreeOfRelationExtractorAnnotator.class)
* AnalysisEngineFactory.createEngineDescription(DegreeOfRelationExtractorAnnotator.class)
On building AnalysisEngineDescription with these lines it throws error.
'Error initializing "org.apache.ctakes.relationextractor.ae.DegreeOfRelationExtractorAnnotator" from descriptor <unknown>.'
B)
Then I tried with Jar based approach by adding the below mentioned line
* AnalysisEngineFactory.createEngineDescription("/org/apache/ctakes/org/apache/ctakes/relationextractor/models/degree_of/model.jar")
This too failed with error,
An import could not be resolved. No file with name "/org/apache/ctakes/org/apache/ctakes/relationextractor/models/location_of/model/jar.xml" was found in the class path or data path. (Descriptor: <unknown>)
Can someone please help me how to resolve any of these two errors ?
Comments, Pointers, Solution all is welcome.
Regards,
Re: Errors in Invoking Degree-of-Text-Relation Annotator From Java
Posted by James Masanz <ma...@gmail.com>.
I don't know if this test is up to date, but I see that the test:
org.apache.ctakes.relationextractor.ae.RelationExtractorAnnotatorsTest
uses the line:
builder.add(findDescription(DegreeOfRelationExtractorAnnotator.class));
You could try comparing what you are doing to what that test does.
If that test is not working, we should create a JIRA item so it is tracked
and fixed.
On Mon, Jan 8, 2018 at 1:21 AM, Prakhar Gaur <pr...@infosys.com>
wrote:
> Hello and happy new year wishes to Everyone,
>
> Config: cTakes 4.0 integrated with my Java project on Windows environment.
>
> I am want to create an 'AnalysisEngine' with DegreeOfTextRelation builder
> added programmatically in Java.
>
> For above I have tried two approaches both unsuccessfully:
>
> A)
> Below are the two lines of code I have added to AnalysisEngineDescription
> for the above mentioned purpose.
>
> * AnalysisEngineFactory.createPrimitiveDescription(
> DegreeOfRelationExtractorAnnotator.class)
>
> * AnalysisEngineFactory.createEngineDescription(
> DegreeOfRelationExtractorAnnotator.class)
>
> On building AnalysisEngineDescription with these lines it throws error.
> 'Error initializing "org.apache.ctakes.relationextractor.ae.
> DegreeOfRelationExtractorAnnotator" from descriptor <unknown>.'
>
> B)
> Then I tried with Jar based approach by adding the below mentioned line
>
> * AnalysisEngineFactory.createEngineDescription("/org/
> apache/ctakes/org/apache/ctakes/relationextractor/
> models/degree_of/model.jar")
>
> This too failed with error,
> An import could not be resolved. No file with name
> "/org/apache/ctakes/org/apache/ctakes/relationextractor/models/location_of/model/jar.xml"
> was found in the class path or data path. (Descriptor: <unknown>)
>
>
> Can someone please help me how to resolve any of these two errors ?
> Comments, Pointers, Solution all is welcome.
>
> Regards,
>