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 6EA496D7C for ; Fri, 3 Jun 2011 13:21:00 +0000 (UTC) Received: (qmail 20563 invoked by uid 500); 3 Jun 2011 13:21:00 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 20531 invoked by uid 500); 3 Jun 2011 13:21:00 -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 20523 invoked by uid 99); 3 Jun 2011 13:21:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2011 13:21:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [130.83.156.225] (HELO lnx500.hrz.tu-darmstadt.de) (130.83.156.225) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2011 13:20:53 +0000 Received: from pandora.tk.informatik.tu-darmstadt.de (pandora.tk.informatik.tu-darmstadt.de [130.83.163.131]) by lnx500.hrz.tu-darmstadt.de (8.14.4/8.14.4/HRZ/PMX) with ESMTP id p53DKSGp011610 for ; Fri, 3 Jun 2011 15:20:28 +0200 (envelope-from eckartde@tk.informatik.tu-darmstadt.de) Received: from highfire.upw-it.local (217.113.182.34) by pandora.tk.informatik.tu-darmstadt.de (130.83.163.131) with Microsoft SMTP Server (TLS) id 8.2.176.0; Fri, 3 Jun 2011 15:20:28 +0200 Subject: Re: How to remove UIMA annotations? MIME-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset="iso-8859-1" From: Richard Eckart de Castilho In-Reply-To: Date: Fri, 3 Jun 2011 15:20:25 +0200 Content-Transfer-Encoding: quoted-printable Message-ID: <9998835B-B078-4EFE-80A0-C6F74BDF62D4@tk.informatik.tu-darmstadt.de> References: <8FA6BBDE-D0E3-4A1D-A9BE-1636E5F146A3@tk.informatik.tu-darmstadt.de> To: "user@uima.apache.org" X-Mailer: Apple Mail (2.1084) X-PMX-TU: seen v1.2 by 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.6.3.130624 X-PMX-RELAY: outgoing You copy them from the index into a list and after that you iterate over = the list to remove them from the indexes. With uimaFIT and JCas wrappers you would write (there are similar calls = for CAS in CasUtils). // Copy the tokens into a new collection to avoid = ConcurrentModificationExceptions List tokens =3D new ArrayList(JCasUtils.select(jcas, = Token.class)); for (Token t : tokens) { t.removeFromIndexes(); } With native UIMA native you'll have to go through the AnnotationIndex = API as in your previous code example. Cheers, Richard Am 03.06.2011 um 14:07 schrieb Rashad: > Ah I see. >=20 > How would i go about removing ALL Token annotations? >=20 > As they are useless to me as they are space tokenisers. --=20 -------------------------------------------------------------------=20 Richard Eckart de Castilho Technical Lead Ubiquitous Knowledge Processing Lab=20 FB 20 Computer Science Department =20 Technische Universit=E4t Darmstadt=20 Hochschulstr. 10, D-64289 Darmstadt, Germany=20 phone [+49] (0)6151 16-7477, fax -5455, room S2/02/B117 eckartde@tk.informatik.tu-darmstadt.de=20 www.ukp.tu-darmstadt.de=20 Web Research at TU Darmstadt (WeRC) www.werc.tu-darmstadt.de -------------------------------------------------------------------=20