[
https://issues.apache.org/jira/browse/UIMA-6160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16995058#comment-16995058
]
Marshall Schor commented on UIMA-6160:
--------------------------------------
Another alternative definition, given that startAt(123) is a shorthand, is to
be more opinionated around when this form was used, and add additional
common-sense requirements. For example, we could require that typePriority not
be set, and if it was, we could throw a runtime exception, the logic being that
this would much more likely be a user error, than an intent.
The infrequent exception (if any) where someone wanted typepriorities used
could use the explicit 2 argument form of startAt.
Other cases where it would be quite unlikely to have a combination of settings
with startAt(123) form, could also be designed to throw exceptions. We would
only do this for cases where it was much more likely this was a user error than
an intent.
> 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)