You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Leonardo Mendes <le...@gmail.com> on 2009/03/27 13:06:24 UTC

Counting Feature Values

Hi folks!
Is there a simple way to count all different values of a feature in a
annotation?

For example:

TokenAnnotation
       -WordFeature
       -POSFeature

How to know how many POS classes i have in my cas?


Thanks,
--
Leonardo Silva Kury Aragão Mendes
Bacharel em Ciência da Computação
(98) 8805 1985



>
>

Re: Counting Feature Values

Posted by Eugenie Giesbrecht <eg...@Uni-Osnabrueck.DE>.
Hi Leonardo,

if you are interested only in the number of classes of POS tags and  
you are using the "native" UIMA Tagger, the "easy" way is to run  
JUnit TaggerTest of the Tagger package. The output on the console  
will show you both the  number of classes ( smth like "Number of part- 
of-speech tags used: 93" ) as well as the tags that are used.

Best,
Eugenie


On Mar 30, 2009, at 10:44 AM, Thilo Goetz wrote:

> Hi,
>
> there is no "easy" way.  I would iterate over the annotations,
> put the feature values in sets and check the cardinality of the
> sets when done.  You've probably figured this out yourself...
>
> --Thilo
>
> Leonardo Mendes wrote:
>> Hi folks!
>> Is there a simple way to count all different values of a feature in a
>> annotation?
>>
>> For example:
>>
>> TokenAnnotation
>>        -WordFeature
>>        -POSFeature
>>
>> How to know how many POS classes i have in my cas?
>>
>>
>> Thanks,
>> --
>> Leonardo Silva Kury Aragão Mendes
>> Bacharel em Ciência da Computação
>> (98) 8805 1985
>>
>>
>>
>>>
>>
>



*******************************************
Institute of Cognitive Science
University of Osnabrueck
Albrechtstrasse 28
49076 Osnabrueck

http://www-lehre.inf.uos.de/~egiesbre/

******************************************



Re: Counting Feature Values

Posted by Thilo Goetz <tw...@gmx.de>.
Hi,

there is no "easy" way.  I would iterate over the annotations,
put the feature values in sets and check the cardinality of the
sets when done.  You've probably figured this out yourself...

--Thilo

Leonardo Mendes wrote:
> Hi folks!
> Is there a simple way to count all different values of a feature in a
> annotation?
> 
> For example:
> 
> TokenAnnotation
>        -WordFeature
>        -POSFeature
> 
> How to know how many POS classes i have in my cas?
> 
> 
> Thanks,
> --
> Leonardo Silva Kury Aragão Mendes
> Bacharel em Ciência da Computação
> (98) 8805 1985
> 
> 
> 
>>
>