uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tiziano Lorenzetti <tiziano.lorenze...@gmail.com>
Subject Re: dinamically type system creation
Date Tue, 13 May 2014 16:15:33 GMT
You got the point. I didn't tell UIMA to use my type system. In fact,
previously, I created the CAS as follow:

JCas jcas = JCasFactory.createJCas();

and then I executed the engine with a simple pipeline.

SimplePipeline.runPipeline(jcas, ae);

Now I've found a solution: I create the TypeSystemDescription in a manager
class, and I tell UIMA to use it

JCas jcas = JCasFactory.createJCas(tsd);

It works. The only thing remaining is to tell UIMA to use all the type
systems, not only the one I specified...but I'll figure it out.

Thank you.


2014-05-13 17:46 GMT+02:00 Richard Eckart de Castilho <rec@apache.org>:

> How do you create the CAS and/or your reader/analysis engines/pipelines?
> Or more specifically: how do you tell UIMA to actually use your type
> system?
>
> Cheers,
>
> -- Richard
>
> On 13.05.2014, at 15:55, Tiziano Lorenzetti <tiziano.lorenzetti@gmail.com>
> wrote:
>
> > Dear all,
> > I'm new to UIMA and I'm trying to develope an annotator that creates
> > dinamically a type system with serveral feature structure.
> > To accomplish this, the annotator does:
> >
> > ...
> > TypeSystemDescription tsd =
> > TypeSystemDescriptionFactory.createTypeSystemDescription(new String[0]);
> > tsd.addType("it.uniroma2.art.ExcelAnnotation", "",
> "uima.tcas.Annotation");
> > TypeDescription type = tsd.getType("it.uniroma2.art.ExcelAnnotation");
> > type.addFeature("newUIMAFeature", "", "uima.cas.String");
> > ...
> >
> > In another annotator, I try to access this type system and its features
> in
> > this way:
> >
> > TypeSystem ts = aCAS.getTypeSystem();
> > Iterator<Type> types = ts.getTypeIterator();
> > Iterator<Feature> features = ts.getFeatures();
> >
> > but neither the type system and its features are present. How could I
> reach
> > my goal?
> >
> > Thank you all.
> >
> > Tiziano Lorenzetti
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message