[ 
https://issues.apache.org/jira/browse/UIMA-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15513455#comment-15513455
 ] 

Marshall Schor commented on UIMA-5115:
--------------------------------------

Details of positioning and bounds, with and without typePriorities:  Here's how 
I think uimaFIT currently is implemented:
* (Assume FSp is the FeatureStructure being used as a position, or as a bound)
* The type of FSp is ignored; only the begin/end values are used
* The starting position is the first (left-most) FS >= FSp (using just 
begin/end)
** In the case where there are multiple FSs with the same begin/end as FSp, the 
starting position is the left-most one of these
* For bounding operations, if there is an FS which is exactly equal (has the 
same "id") to FSp, it is skipped.
** Because of the left-most rule, the bounding operation might return fsA, fsB, 
(skip fsC which has the same *id* as FSp), fsD, etc.

Here's a proposal of how this would work with typePriorities (this is different 
from how subiterator works, see following):
* The type of FSp is used as part of the comparison, using the AnnotationIndex 
comparator
* The rest of the definition is as above, except that the comparisons use the 
typePriorities

Subiterator uses this logic:
* It always uses type priorities
* For positioning, it works as above (type priority case)
* For bounding operations: it first positions using the FSp, and then advances 
until it finds the first FS not equal (using begin/end/type), and starts there

Subiterator style, without typePriority (not currently available, here's a 
proposed design consistent with the subiterator style):
* For positioning the first (left-most) FS >= FSp (using just begin/end)
* For bounding operations, it first positions using the FSp, then advances 
until it finds the first FS not equal (using just begin/end), and starts there. 

The differences between the subiterator / uimaFIT approaches (for corresponding 
typePriority use or not) may be accidental artifacts of implementation.  
Should we make the uv3 select() implementation for bounding operations:
* skip the FS which has the same id (only) [ uimaFIT sytle ] or
* skip all FSs until finding the first one > than FSp (using either 
begin/end/type or just begin/end) [ subiterator sytle ]

I would like to hear from the user community, too :-)

> uv3 select() api for iterators and streams over CAS contents
> ------------------------------------------------------------
>
>                 Key: UIMA-5115
>                 URL: https://issues.apache.org/jira/browse/UIMA-5115
>             Project: UIMA
>          Issue Type: New Feature
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Priority: Minor
>             Fix For: 3.0.0SDKexp
>
>
> Design and implement a select() API based on uimaFIT's select, integrated 
> well with Java 8 concepts.  Initial discussions in UIMA-1524.  Wiki with 
> diagram: https://cwiki.apache.org/confluence/display/UIMA/UV3+Iterator+support



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to