Return-Path: Delivered-To: apmail-incubator-uima-user-archive@locus.apache.org Received: (qmail 31385 invoked from network); 13 Mar 2008 18:55:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Mar 2008 18:55:14 -0000 Received: (qmail 96947 invoked by uid 500); 13 Mar 2008 18:55:11 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 96826 invoked by uid 500); 13 Mar 2008 18:55:11 -0000 Mailing-List: contact uima-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: uima-user@incubator.apache.org Delivered-To: mailing list uima-user@incubator.apache.org Received: (qmail 96817 invoked by uid 99); 13 Mar 2008 18:55:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2008 11:55:11 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.5.164.99] (HELO casc.gd-ais.com) (192.5.164.99) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2008 18:54:32 +0000 Received: from ([10.13.13.25]) by camv02-relay2.casc.gd-ais.com with SMTP id 5202701.84608211; Thu, 13 Mar 2008 11:52:58 -0700 Received: from nybf01-mail01.ad.gd-ais.com ([137.100.60.11]) by vaff01-fes01.ad.gd-ais.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 13 Mar 2008 14:53:44 -0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Type Priorities Date: Thu, 13 Mar 2008 14:53:40 -0400 Message-ID: <31923CD68FF05B42B1D3AC08F2D733B503074B9E@nybf01-mail01.ad.gd-ais.com> In-Reply-To: <31923CD68FF05B42B1D3AC08F2D733B503074B9B@nybf01-mail01.ad.gd-ais.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Type Priorities Thread-Index: AciFMUQc5pE/5MfYQ1ONRaq8a/j3mQABnc2QAADcsuA= References: <47D95DBB.5050609@uni-jena.de> <47D95F6D.9030606@gmx.de> <47D96677.7090000@uni-jena.de> <31923CD68FF05B42B1D3AC08F2D733B503074B9B@nybf01-mail01.ad.gd-ais.com> From: "LeHouillier, Frank D." To: X-OriginalArrivalTime: 13 Mar 2008 18:53:44.0885 (UTC) FILETIME=[90327650:01C8853B] X-Virus-Checked: Checked by ClamAV on apache.org Typos in my code example fixed: public ArrayList getAbbreviations(Entity entity,=20 JFSIndexRepository index) { AnnotationIndex annotationIndex =3D index.getAnnotationIndex(Abbreviation.type); FSIterator iter =3D index.subiterator(entity); while (iter.hasNext()) { abbrev.add(currAbbrev); } return abbrev; } -----Original Message----- From: LeHouillier, Frank D. [mailto:Frank.LeHouillier@gd-ais.com]=20 Sent: Thursday, March 13, 2008 2:47 PM To: uima-user@incubator.apache.org Subject: RE: Type Priorities I can't see in your example why the using the subiterator doesn't work. You should still be able to iterate through all the abbreviations that are within the span of an entity, even if the entity is itself an abbreviation, or am I wrong? AnnotationIndex index =3D JFSIndexRepository().getAnnotationIndex(Abbreviation.type); FSIterator itr =3D index.subiterator(entity); while (iter.hasNext()) { abbrev.add(currAbbrev); } return abbrev;=20 How does the type priority even come into play? -----Original Message----- From: Katrin Tomanek [mailto:katrin.tomanek@uni-jena.de]=20 Sent: Thursday, March 13, 2008 1:38 PM To: uima-user@incubator.apache.org Subject: Re: Type Priorities Hi Thilo, >> Actually, I am using the subiterator functionality and I need to have >> type priorities to be set. But I don't want the user of a component to=20 >> be able to alter the type priorities by modifying the descriptors=20 >> where type priorities typically are set. >=20 > is that necessary? The user mustn't change the type system either, > else the annotator will no longer work. Wouldn't you say it's part > of the contract that such metadata is not changed by the user? well, yeah. Could see it that way. But if I know at time of writing the=20 component which types it will use and how the priorities should look=20 like, why should I risk to let the user violate that "contract" ? But to come back to the true problem: I am asking about type priorities=20 because I am using the subiterator. For me, type priorities are=20 necessary when the types I am interested in are of exactly the same=20 offset as the type with which I constrain my subiterator. So, the=20 question for me is: shall I use the subiterator (and define priorities=20 in the compoennts descriptor) or shall I write my own function(see=20 below) doing what I want without the type priority problems: ----- SNIP -------- // gives me a list of all abbreviations which are "within" my entity public ArrayList getAbbreviations(Entity entity,=20 JFSIndexRepository index) { ArrayList abbrev =3D new ArrayList(); int StartOffset =3D entity.getBegin(); int EndOffset =3D entity.getEnt(); Iterator iter =3D = index.getAnnotationIndex(Abbreviation.type).iterator(); Abbreviation currAbbrev =3D (Abbreviation) iter.next(); if (currAbbrev.getBegin() >=3D startOffset && currAbbrev.getEnd() <=3D=20 endOffset) { abbrev.add(currAbbrev); } } return abbrev; } ----- SNIP -------- Do you see an efficiency disadvantage when using the above function=20 instead of the subiterator? Katrin