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 other ways to solve this issue without using
JCasUtil, but it seems JCasUtil provide an easy way to do this by using the
methods
JCasUtil.select and JCasUtil.selectCovered.

greetings Hannes


Am 13.02.2014 22:11, schrieb 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 [email protected]




On Feb 13, 2014, at 6:03 AM, hannes schantl
<[email protected]> <[email protected]> wrote:


 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:
jcas.getCasType("AnnotationName")

greetings Hannes

Reply via email to