Re: uima jcas get annotation type from string

2014-02-14 Thread hannes schantl
thanks for the answers. Is there also a way to get a Type from a String, which can be used as argument for the JCasUtil.select method? I want to use the type object to get all Annotations of type Sentence from the Cas. And further extract all Annotations within this sentence. There for sure

Re: uima jcas get annotation type from string

2014-02-14 Thread Richard Eckart de Castilho
On 14.02.2014, at 09:50, hannes schantl johannes.scha...@gmail.com wrote: thanks for the answers. Is there also a way to get a Type from a String, which can be used as argument for the JCasUtil.select method? The JCasUtil methods assume that you have access to JCas classes, e.g. import

Re: uima jcas get annotation type from string

2014-02-14 Thread Thomas Ginter
Once you have the Type object you can get all and index to all the annotations in the case using: AnnotationIndexAnnotation mySentenceIndex = jcas.getAnnotationIndex(mySentenceTypeObj); Then you can get an iterator over the index using: FSIteratorAnnotation mySentenceIterator =

Re: uima jcas get annotation type from string

2014-02-13 Thread Peter Klügl
maybe something like cas.getTypeSystem().getType(my.package.AnnotationName) Best, Peter Am 13.02.2014 14:03, schrieb hannes schantl: Hi, Is there a way to get an annotation Type from the cas(or Jcas) from a string. For example, i am looking for something like that:

Re: uima jcas get annotation type from string

2014-02-13 Thread Thomas Ginter
There are a couple of different ways to get a pointer to specific Type object. jcas.getRequiredType(“mypackage.AnnotationType”); (cas|jcas).getTypeSystem.getType(“mypackage.AnnotationType”); The question is what do you want to do with the Type object once you have it. Thanks, Thomas Ginter