You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (Jira)" <de...@uima.apache.org> on 2020/01/07 14:30:00 UTC

[jira] [Commented] (UIMA-6160) Single int arg version of select.startAt()?

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

Marshall Schor commented on UIMA-6160:
--------------------------------------

startAt(x, MAX_VALUE) with type priorities on, could fail to find *all* Annotations starting at x, if there were a bunch of them whose end was MAX_VALUE.   I admit that's a bit far fetched...

Perhaps a good reason to throw an exception if someone "explicitly" calls for type priorities to be used, and then uses this startAt method, is to alert them to a mistake in their thinking, which could be useful. I think this is aligned with a meta-goal of UIMA: helping users to write correct code.

> Single int arg version of select.startAt()?
> -------------------------------------------
>
>                 Key: UIMA-6160
>                 URL: https://issues.apache.org/jira/browse/UIMA-6160
>             Project: UIMA
>          Issue Type: Improvement
>          Components: UIMA
>    Affects Versions: 3.1.1SDK
>            Reporter: Richard Eckart de Castilho
>            Priority: Major
>
> If one wants to start looking for a particular annotation at a given character position, then I think it would be convenient to be able to say "select(Token.class).startAt(offset)", instead of having to say "select(Token.class).startAt(offset, offset)".
> What is not clear to me from reading the documentation is whether a Token which *ends* at offset would be returned or not. 
> Another special case which is not clear by the documentation is whether a Token which *starts and ends*  at offset would be returned.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)