uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilo Goetz <twgo...@gmx.de>
Subject Re: Question: How to get diffrent Annotations at exactly the same position?
Date Wed, 30 Jan 2008 12:39:44 GMT
Eddie Epstein wrote:
> Hi Isaac,
> If I understand your scenario, you want to ignore duplicate Person 
> annotations. The set index type is useful for just this purpose.
> The javadocs for this index type say:
> Indexing strategy: set index. A set index contains no duplicates of the 
> same type, where a duplicate is defined by the indexing comparator. A 
> set index is not guaranteed to be sorted.
> A simple test shows an iterator for a set index to respect sort order, 
> so I'm not sure what the documentation means about "not guaranteeed to 
> be sorted". We'll have to wait for Thilo to clarify this.

The actual implementation does use a sorted set (as opposed
to, say, a hash set).  So annotations do come out sorted on
iteration.  I don't see that changing in the near future.

Let me know if Eddie's comments answered your question or not.


View raw message