Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 51565DABB for ; Fri, 16 Nov 2012 01:16:23 +0000 (UTC) Received: (qmail 71869 invoked by uid 500); 16 Nov 2012 01:16:23 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 71802 invoked by uid 500); 16 Nov 2012 01:16:23 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 71793 invoked by uid 99); 16 Nov 2012 01:16:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 01:16:22 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of himanshu.gahlot86@gmail.com designates 209.85.223.175 as permitted sender) Received: from [209.85.223.175] (HELO mail-ie0-f175.google.com) (209.85.223.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 01:16:16 +0000 Received: by mail-ie0-f175.google.com with SMTP id c13so2889405ieb.6 for ; Thu, 15 Nov 2012 17:15:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=YGO47qbadw1LwF041uxV0gy9xbFxtb8AJH2hgEpyuzc=; b=OLV+seXIwqUirrenzGcYfNtR0XWzNcSlTvE+F9uHcjFSAQ6lyQOShZ7qzWgU+m+YSb SLtLDXn/hdp5EOCXzhSdRw2zcWLvdfhYinPcrnxWtW95C2wgqObfr4HQTNkJJMrApz2j +JAn++ze2DOVnL6h/uT+z8PPfUh7yXUSMSUWyO+0zgN4pqYTpXVZs6bPoP0axwkUKF+P 8SkJn3zfWTs8d9qUNJUmh4dnvTYeBXYueSVLFM/g97/lPgMlH7IHanQtpMyt0r2AfxdW +VnvcQ5FAyKkv+/kjd4G+uy30Ydy/Bp/a43apUt+CxiTl3CIeNB2i40MGRSRQg5fhbAN /Btw== Received: by 10.50.183.168 with SMTP id en8mr1819759igc.10.1353028555608; Thu, 15 Nov 2012 17:15:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.79.228 with HTTP; Thu, 15 Nov 2012 17:15:35 -0800 (PST) In-Reply-To: References: From: Himanshu Gahlot Date: Thu, 15 Nov 2012 17:15:35 -0800 Message-ID: Subject: Re: Arrays/Lists of custom types To: user@uima.apache.org Content-Type: multipart/alternative; boundary=14dae9340c9b6d92f804ce9282dc X-Virus-Checked: Checked by ClamAV on apache.org --14dae9340c9b6d92f804ce9282dc Content-Type: text/plain; charset=ISO-8859-1 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, create an FSList using your List, and set this FSList as the 'words' feature in your Sentence. Some untested code to help you out: List wordList = //your list of words in the current sentence FSList wordFSList = FSCollectionFactory.createFSList(aJCas, wordList); sentence.setWords(wordFSList); Note that I am using FSCollectionFactory class from uimafit ( http://uimafit.googlecode.com/svn-history/r623/trunk/apidocs/org/uimafit/util/FSCollectionFactory.html ). Himanshu 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 --14dae9340c9b6d92f804ce9282dc--