Hi Pei,
   Thanks so much for this information. Yes this helped me a lot, I tried
it and it is working. I only need to filter it with Class<T extends
Annotation> then check if the list is empty or not. Thanks again

On Mon, Feb 4, 2013 at 4:29 PM, Chen, Pei <[email protected]>wrote:

> Hi Shady,
> uimaFIT (included as a dependency by cTAKES) has a bunch of JCasUtil's
> that allows you to select by type or begin/end spans..
> For example:
> for (Sentence sentence : JCasUtil.select(jCas, Sentence.class)) {
>           List<? extends Annotation> blah = JCasUtil.selectCovered(
>               goldView, argClass, goldArg);     ...
> }
>
> Hope that helps.
>
> > -----Original Message-----
> > From: Shady Hussein [mailto:[email protected]]
> > Sent: Monday, February 04, 2013 7:49 AM
> > To: [email protected]
> > Subject: Annotations of a token
> >
> > Dear All,
> >   Is there a way to get all the annotations of a single token?. I want
> to loop on
> > tokens inside a sentence and get all the annotations on this token, in a
> similar
> > fashion like the GUI. I would be grateful, cause this will make my life
> easier to
> > differentiate between annotations. Thanks for your cooperation
> >
> > --
> > Thanks and best Regards,
> >
> > Shady AbdelAziz
>



-- 
Thanks and best Regards,

Shady AbdelAziz

Reply via email to