uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Epstein <eaepst...@gmail.com>
Subject Re: SimpleServer configuration with Sofas
Date Fri, 10 Dec 2010 14:06:47 GMT
On Thu, Dec 9, 2010 at 5:12 AM, Ben Morgan <benm.morgan@gmail.com> wrote:
> Eddie wrote:
>> As I understand it, your aggregate has two delegates: the first is
>> sofa aware, reads the input data from the _InitialView and creates a
>> new view called plainText; the second delegate is sofa unaware and
>> expects to get the plainText view passed to it.
> The aggregate is not quite like that:
>    _InitialView
>        -> urlString (input sofa of pdfextractor)
>    plainText
>        <- "extractedText" output sofa/view from pdfextractor
>        -> goes to "_InitialView" input of email annotator

With sofamapping, the toplevel <aggregateSofaName> is the actual name
of View in the CAS. Here one should find the views named _InitialView
and extractedText

>> This all works fine when run from CVD. When run from SimpleServer,
>> processing crashes trying to access plainText. Presumably this is
>> happening when the second delegate is being called. This could happen
>> if for some reason sofamapping is broken when running under
>> SimpleServer.
>> It would be useful to:
>> 1. know that the 1st delegate is running ok, and the problem is on the 2nd
> When I tested the 1st delegate alone with SimpleServer, it did not output
> what I expected. In the SimpleServer UI, you can choose what kind of output
> you want, and I chose "Inline XML". I got as a Result then:
>    <Result> http://input-text/url-to-the.pdf </Result>
> But this result came back faster than the component could have processed the
> input (it should have taken 3 seconds at least, instead of a few milliseconds).

I'm assuming that SimpleServer is only looking in _InitialView to
extract results.

> So the 1st delegate independantly did not work, while the 2nd delegate did.
>> 2. dumping the Cas contents after calling the first delegate to see
>> exactly what is in there. This can be done by putting XmiSerialization
>> code at the end of the 1st delegate.
> I assume that I would do this in my own code. (As in, I wouldn't touch the
> code of the SimpleServer). Alright, I'll try to do that and see what comes out.

Dumping the CAS to stdout is basically a one liner:

    try {
      XmiCasSerializer.serialize(aCAS, System.out);
    } catch (SAXException e1) {

View raw message