You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Katrin Tomanek <to...@coling-uni-jena.de> on 2007/06/21 13:41:12 UTC

programmatic access to AE's capabilities

Hello everybody,

is it possible to programmatically set an AE's capabilities.
I know that I can set the capabilities in the descriptor, but can I 
access them somehow programmatically in the AE (e.g. to check some 
constraints etc.) ?

Thanks for help,

Katrin

-- 
Katrin Tomanek
Jena University Language and Information Engineering (JULIE) Lab
Phone: +49-3641-944307
Fax:   +49-3641-944321
email: tomanek@coling-uni-jena.de
URL:   http://www.coling.uni-jena.de

RE: programmatic access to AE's capabilities

Posted by "LeHouillier, Frank D." <Fr...@gd-ais.com>.
Just a note.  I'm currently using JRuby as part of an annotator and I
generate all my internal annotation classes from the type system
dynamically, like JCasGen but on the fly.  Right now, the only ways I
have access to the type system are to either have the Analysis Engine
Descriptor point at itself, which seems weird or get the type system
from the first Cas that comes through.  It would be nice to be able to
see this stuff somehow.  

Frank

-----Original Message-----
From: lally.adam@gmail.com [mailto:lally.adam@gmail.com] On Behalf Of
Adam Lally
Sent: Thursday, June 21, 2007 6:15 PM
To: uima-user@incubator.apache.org; tomanek@coling-uni-jena.de
Subject: Re: programmatic access to AE's capabilities

On 6/21/07, Katrin Tomanek <to...@coling-uni-jena.de> wrote:
> BTW: where are the capabilities _really_ used in UIMA?
>

There are only a small number of things that capabilities are used for
right now.

The main use is just for documentation purposes - say if you want to
register a component in a repository like the one at
http://uima.lti.cs.cmu.edu and allow people to search and
what types your component produces as output.

They can also be used in Flow Controllers.  The example
WhiteboardFlowController uses them to automatically compute the flow.
Based on the capabilities it tries to figure out what order makes
sense to run your annotators in.  And it won't run an annotator at all
if the CAS doesn't contain instances of the input types that the
annotator declares.  But that's just an example FlowController, not a
general behavior of the UIMA framework.

The Document Analyzer tool will not display any types that are not
listed in the outputs (of the outermost Aggregate AE).  So for example
if Tokens are produced internally by some annotator and consumed by a
downstream annotator, but are not declared as outptus of the entire
aggregate, then they won't show up in the CAS Viewer display.

Finally they are used in the computation of the "ResultSpecification"
that's passed to annotator's output methods.  This gives an annotator
the opportunity to optimize its processing by not producing Types that
aren't necessary.  Most annotators don't pay attention to the result
specification anyway, though.

-Adam

Re: programmatic access to AE's capabilities

Posted by Adam Lally <al...@alum.rpi.edu>.
On 6/21/07, Katrin Tomanek <to...@coling-uni-jena.de> wrote:
> BTW: where are the capabilities _really_ used in UIMA?
>

There are only a small number of things that capabilities are used for
right now.

The main use is just for documentation purposes - say if you want to
register a component in a repository like the one at
http://uima.lti.cs.cmu.edu and allow people to search and
what types your component produces as output.

They can also be used in Flow Controllers.  The example
WhiteboardFlowController uses them to automatically compute the flow.
Based on the capabilities it tries to figure out what order makes
sense to run your annotators in.  And it won't run an annotator at all
if the CAS doesn't contain instances of the input types that the
annotator declares.  But that's just an example FlowController, not a
general behavior of the UIMA framework.

The Document Analyzer tool will not display any types that are not
listed in the outputs (of the outermost Aggregate AE).  So for example
if Tokens are produced internally by some annotator and consumed by a
downstream annotator, but are not declared as outptus of the entire
aggregate, then they won't show up in the CAS Viewer display.

Finally they are used in the computation of the "ResultSpecification"
that's passed to annotator's output methods.  This gives an annotator
the opportunity to optimize its processing by not producing Types that
aren't necessary.  Most annotators don't pay attention to the result
specification anyway, though.

-Adam

Re: programmatic access to AE's capabilities

Posted by Katrin Tomanek <to...@coling-uni-jena.de>.
Adam Lally wrote:
> Unfortunately no, an annotator cannot in general access the
> information from its descriptor file, such as its capabilities.
> Configuration parameters are the recommended way to parameterize an
> annotator's behavior.
> 
> -Adam

Ok. That's what I actually thought when searching through the API for it.

BTW: where are the capabilities _really_ used in UIMA?

best regards,
Katrin


> 
> On 6/21/07, Katrin Tomanek <to...@coling-uni-jena.de> wrote:
>> Hello everybody,
>>
>> is it possible to programmatically set an AE's capabilities.
>> I know that I can set the capabilities in the descriptor, but can I
>> access them somehow programmatically in the AE (e.g. to check some
>> constraints etc.) ?
>>
>> Thanks for help,
>>
>> Katrin
>>
>> -- 
>> Katrin Tomanek
>> Jena University Language and Information Engineering (JULIE) Lab
>> Phone: +49-3641-944307
>> Fax:   +49-3641-944321
>> email: tomanek@coling-uni-jena.de
>> URL:   http://www.coling.uni-jena.de
>>


Re: programmatic access to AE's capabilities

Posted by Adam Lally <al...@alum.rpi.edu>.
Unfortunately no, an annotator cannot in general access the
information from its descriptor file, such as its capabilities.
Configuration parameters are the recommended way to parameterize an
annotator's behavior.

-Adam

On 6/21/07, Katrin Tomanek <to...@coling-uni-jena.de> wrote:
> Hello everybody,
>
> is it possible to programmatically set an AE's capabilities.
> I know that I can set the capabilities in the descriptor, but can I
> access them somehow programmatically in the AE (e.g. to check some
> constraints etc.) ?
>
> Thanks for help,
>
> Katrin
>
> --
> Katrin Tomanek
> Jena University Language and Information Engineering (JULIE) Lab
> Phone: +49-3641-944307
> Fax:   +49-3641-944321
> email: tomanek@coling-uni-jena.de
> URL:   http://www.coling.uni-jena.de
>