I've done it this way. First, I defined a new type KeyValuePair of
type uima.cas.TOP. It has a feature named key of type uima.cas.String
and a second feature named value of type uima.cas.Integer. Second, I
added a uima.cas.FSArray of KeyValuePair to the annotation type. It
used the Component
The CAS doesn't natively support hash maps. One possible motivation is that the
design was aimed at allowing multiple independent systems to process the CAS
data, including Annotators written in C++. To support this, it would be
necessary to implement a common hash map in multiple languages
An: user@uima.apache.org
Betreff: Re: HashMap as type feature
Hi,
you could define a feature structure e.g.
StringStringMapEntry {
String key
String value
}
and store these in an FSList. Then, write additional convenience code around
that which transforms this to/from a MapString, String
TOP or FeatureStructure? Is
it possible to store an arbitray object into a CAS?
Cheers,
Armin
-Ursprüngliche Nachricht-
Von: Richard Eckart de Castilho [mailto:r...@apache.org]
Gesendet: Mittwoch, 16. Oktober 2013 18:02
An: user@uima.apache.org
Betreff: Re: HashMap as type
. Oktober 2013 18:53
An: user@uima.apache.org
Betreff: Re: HashMap as type feature
Armin,
Our team does this with an annotation type designed to store feature vectors
for Machine Learning applications. In this case we use a StringArray feature
for the keys and a StringArray feature
[mailto:thomas.gin...@utah.edu]
Gesendet: Mittwoch, 16. Oktober 2013 18:53
An: user@uima.apache.org
Betreff: Re: HashMap as type feature
Armin,
Our team does this with an annotation type designed to store feature vectors
for Machine Learning applications. In this case we use a StringArray feature
You could also use the entrySet which gives you all the key/value pairs.
-- Richard
On 17.10.2013, at 16:43, armin.weg...@bka.bund.de wrote:
Hi Thomas,
thanks for your answer. Using HashMap, does the n-th element of keySet()
always corresponds to the n-th element of values()? Is this a
Looks good, I will try it.
Thank you,
Armin
On 10/17/13, Richard Eckart de Castilho r...@apache.org wrote:
You could also use the entrySet which gives you all the key/value pairs.
-- Richard
On 17.10.2013, at 16:43, armin.weg...@bka.bund.de wrote:
Hi Thomas,
thanks for your answer.
Hi,
I'd like to have a type feature that is a list of key-value pairs. The
number of pairs is unknown. What's best for this? Is it even possible?
Thanks,
Armin
Hi,
you could define a feature structure e.g.
StringStringMapEntry {
String key
String value
}
and store these in an FSList. Then, write additional convenience code around
that
which transforms this to/from a MapString, String.
-- Richard
On 16.10.2013, at 17:55, Dr. Armin Wegner
Hi Richard,
thanks for the quick reply. But the answer is a little too short for
me. Can you point me to an example or a documentation, please? I
couldn't find it in the UIMA Tutorial and Developers' Guides. Did I
miss it?
Best,
Armin
On 10/16/13, Richard Eckart de Castilho r...@apache.org
Armin,
Our team does this with an annotation type designed to store feature vectors
for Machine Learning applications. In this case we use a StringArray feature
for the keys and a StringArray feature for the values. The StringArrays are
pulled from a HashMapString, String vector variable and
12 matches
Mail list logo