uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Himanshu Gahlot <himanshu.gahlo...@gmail.com>
Subject Re: Arrays/Lists of custom types
Date Fri, 16 Nov 2012 01:15:35 GMT
Create a feature of type NonEmptyFSList in your Sentence type and name it
'words'. Now in your sentence annotator, iterate over all the words in this
sentence, put them in a List<Word>, create an FSList using your List<Word>,
and set this FSList as the 'words' feature in your Sentence. Some untested
code to help you out:

List<Word> wordList = //your list of words in the current sentence
FSList wordFSList = FSCollectionFactory.createFSList(aJCas, wordList);

Note that I am using FSCollectionFactory class from uimafit (


On Thu, Nov 15, 2012 at 9:37 AM, Administrator <
roman.alexandrovich.mueller@gmail.com> wrote:

> Hello dear uima user,
> Lets say i defined the types Word and Sentence. How to add a feature to
> the type Sentence which holds multiple Words? For instance a list of Words.
> Thanks in advance
> Roman

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message