[
https://issues.apache.org/jira/browse/UIMA-6194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17065914#comment-17065914
]
Michael Stenger commented on UIMA-6194:
---------------------------------------
I got another question on this subject: The matching behavior of
RutaLiteralMatcher confuses me a bit. The commentary in the class, method
getAnnotation, indicates that only strings ranging from the start of a basic
annotation to the end of a basic annotation are considered for matching. In the
respective test, class RutaLiteralMatcherTest, strings "test", "is a test", "."
and so on should be matched, but not "est" or "s a tes". Still, if I try "est"
or "Th", they do pass the Matcher. Is that purposeful behavior? Thanks.
> Ruta: RutaLiteralMatcher throws exception for special choice of string
> ----------------------------------------------------------------------
>
> Key: UIMA-6194
> URL: https://issues.apache.org/jira/browse/UIMA-6194
> Project: UIMA
> Issue Type: Bug
> Components: Ruta
> Affects Versions: 2.8.0ruta
> Reporter: Michael Stenger
> Assignee: Peter Klügl
> Priority: Minor
> Fix For: 2.8.1ruta, 3.0.1ruta
>
>
> For certain combinations of document text and RuleElementLiteral in the
> script, method getAnnotation of class RutaLiteralMatcher throws a
> NullPointerException. This seems to be the case whenever the used string is
> a postfix or infix of a word in the document, but itself doesn't occur.
> h4. Example
> Script
>
> {code:java}
> DECLARE testType;
> "est" {-> testType};
> "est te"{-> testType};
> {code}
> Document
>
> {code:java}
> test test{code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)