uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helen Johnson -X (heljohns - Infobahn Softworld Inc at Cisco)" <heljo...@cisco.com>
Subject SimpleServer, & instantiating CAS with custom typesystem?
Date Mon, 18 Feb 2013 21:37:25 GMT
I'm stumped:

I have a UIMA pipeline that starts with a CollectionReader that

-          reads XML input (response from a REST service),

-          identifies a couple of relevant XML nodes

-          makes document-level annotations from the relevant nodes (title, document body,
footnote section)
>From there, the AnalysisEngine portion of the pipeline has many AEs that I've wrapped
into a single AggregateAnalysisEngine.
The CollectionReader and the AAE all work correctly in this pipeline.

Now I need to transfer this pipeline into a SimpleServer REST service environment.
I've created a PEAR of the AAE portion of the pipeline, but I can't include the CollectionReader
in this PEAR.
First question:
It is my understanding the CR cannot be included in the PEAR for the simpleServer, am I correct
in this?

In order to get those document-zoning annotations of title, body & footnote, I have added
some methods to the Service.java class in the SimpleServer package that do the XML parsing
and then do the adding of these annotations to the JCAS before the AAE is called. The error
that is being thrown at this point is this:

"The server encountered an internal error (JCas type "myPackage.DocClass.ArticleMainTitle"
used in Java code, but was not declared in the XML type descriptor.) that prevented it from
fulfilling this request."

Second question:
Where is Service.java looking for the typesystem xml file to be? I have tried all of the following,
with the same error result:

-          put the typesystem descriptor file, myTSD.xml, in SimpleServer/lib

-          create a jar containing myTSD.xml, put it into SimpleServer/lib and add that to
the build path

-          (after the two above attempts), in SimpleServer project properties, add "lib" to
the UIMA CDE Property Page

-          in SimpleServer project properties, in UIMA Type System, point to the myTSD.xml
file in lib

-          put myTSD.xml in SimpeServer/WebContent/WEB-INF/lib

-          put the jar containing myTSD.xml in the SimpleServer/WebContent/WEB-INF/lib

-          put myTSD.xml in SimpleServer/WebContent/WEB-INF/resources

Final question:
When a CAS gets instantiated (or reset, as it does in Service.java), how can I tell it to
use a custom typesystem, and where will it look for that typesystem.xml file within the SimpleServer
project?

Thank you,
Helen Johnson


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