Hi Tiziano,

On 13/05/2014 09:55, Tiziano Lorenzetti 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?
How do you create your CAS? I guess the types should be found if you create it using:

CAS aCAS = CasCreationUtils.createCas(typeSystemDescription, null, null);

Hope this help,

Alexandre

--
Alexandre Patry, Ph.D
Chercheur / Researcher
http://KeaText.com

Reply via email to