On 10/22/07, Thilo Goetz <[EMAIL PROTECTED]> wrote:
> Eddie Epstein wrote:
> > Consider the following code:
> > AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
> > CAS cas = ae.newCAS();
> > cas.setDocumentText("some text");
> > AnnotationFS fs = cas.createAnnotation(cas.getAnnotationType(), 0,
> > 4);
> > ae.process(cas);
> > System.out.println(fs.getCoveredText());
> >
> > Preexisting fs in the client must be valid after a process call, no?
>
> No. I've been over this with Adam on one of the OASIS calls, too.
I sort of remember discussing this but can't remember ever coming to a
conclusion.
It seems to me that this code ought to work. To me it makes sense
that we say that an _annotator_ shouldn't retain references to FS
across process calls, since the CAS represents a different document
each time. But I think it's entirely another thing so say that an
application can't keep references to FS when it calls an AE's process
method. It doesn't seem very intuitive to me that the object
reference would be invalidated. In any case I don't think we
sufficiently warn our users against this, and since it "happens to
work" they may not be happy if we change it.
If we're going to vote on it, maybe we solicit user opinions too.
-Adam