I was certainly tripped up by it. I'm not even sure that the default behavior shouldn't be different than it is. It feels like an artifact of implementation convenience rather than something the user should expect.
Anyway, perhaps another solution to this problem might be suggested by the findCoverFS method in the Regex annotator. In Katrin's example you could create a dummy Abbreviation with the offsets of the entity, use FSIterator.moveTo() to get to it and add all the valid iterators you find going forward that still fall within the end offset to your list. I'm not sure of the efficiency of moveTo() versus iterating through the whole list though. Is an FSIndex implemented as a hash so that searching through it for the right offsets (using moveTo()) is efficient? -----Original Message----- From: Burn Lewis [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2008 6:09 PM To: [email protected] Subject: Re: Type Priorities I would guess that many users of the subiterator get tripped up by type priorities at some stage ... I certainly have. It'd be nice if we had a version that just used the bounds of the input annotation, e.g. FSIterator subiterator(AnnotationFS window, boolean ambiguous, boolean strict, boolean ignoreWindowTypePriority) or FSIterator subiterator(int windowBegin, int windowEnd, boolean ambiguous, boolean strict) I suspect this is not the first discussion on this! Burn
