Hi, SimpleServer itself is in a way your CR, creating a CAS with the document text you sent. Why do you want to change SimpleServer, it seems that you only want to add annotations to the CAS, not fundamentally change how the CAS is created.

It seems to me that it would be far easier to just create an AE that adds those annotations. Then you won't have any typesystem issues either, since the AE would have the appropriate typesystem.

HTH,
Jens

On 02/18/2013 10:37 PM, Helen Johnson -X (heljohns - Infobahn Softworld Inc at Cisco) wrote:
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




  • SimpleServer... Helen Johnson -X (heljohns - Infobahn Softworld Inc at Cisco)
    • Re: Sim... Jens Grivolla
      • RE:... Helen Johnson -X (heljohns - Infobahn Softworld Inc at Cisco)
        • ... Thomas Ginter
        • ... Helen Johnson -X (heljohns - Infobahn Softworld Inc at Cisco)
          • ... Chris Roeder

Reply via email to