uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksandar Dimitrov <aleks.dimit...@gmail.com>
Subject missing initTypeSystem() in UIMAfit's JCasAnnotator_ImplBase (was: Using OpenNLP type annotations with UIMAfit)
Date Sun, 25 Jan 2015 22:08:36 GMT
On Sun, Jan 25, 2015 at 10:59:45PM +0100, Aleksandar Dimitrov wrote:
> Hi,
> The UIMAfit manual (5.1) states that the preferred way to iterate over tokens in
> the CAS is the following:
>     // JCas version
>     for (Token token : JCasUtil.select(jcas, Token.class)) {
>       ...
>     }
> This assumes a Token.class is importable somewhere. But I'm using the OpenNLP
> tools, which don't provide such a type. Instead, it seems to be generated at run
> time during configuration steps, and is not accessible as a class in the AE (to
> my knowledge.)
> Additionally, when extending o.a.u.fit.component.JCasAnnotator_ImplBase instead
> of o.a.u.component.JCasAnnotator_ImplBase, the method void typeSystemInit(TypeSytem)
> is not provided, which makes instatiating the type system the same way OpenNLP
> does it rather cumbersome (I generate an empty CAS with the typSystemDescription,
> then get its TypSystem and provide the Type and Feature objects from this
> TypeSystem instance as UIMAfit configuration parameters before deploying my AE.)

Scrap that, it doesn't work this way. So my question becomes: can I instantiate
the type system of an UIMAfit annotator the same way OpenNLP does it (working
around the missing typeSystemInit method somehow) or do I have to give up
UIMAfit components? (Or maybe there's an alternative? I'd prefer not to have to
run JCasGen on opennlp's TypeSystem.xml)


View raw message