You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2022/01/14 14:27:29 UTC
[uima-ruta] 01/01: UIMA-6409-Ruta-possible-endless-wildcard-lookahead-in-combination-with-subtokens
This is an automated email from the ASF dual-hosted git repository.
pkluegl pushed a commit to branch bugfix/UIMA-6409-Ruta-possible-endless-wildcard-lookahead-in-combination-with-subtokens
in repository https://gitbox.apache.org/repos/asf/uima-ruta.git
commit ade59396d77e1ca2e90a315b3619d22a26e5b9c1
Author: Peter Klügl <pe...@averbis.com>
AuthorDate: Fri Jan 14 15:27:03 2022 +0100
UIMA-6409-Ruta-possible-endless-wildcard-lookahead-in-combination-with-subtokens
- improve iterator position check
---
.../src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java b/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
index 94d07d5..1b688a3 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
@@ -507,8 +507,8 @@ public class WildCardRuleElement extends AbstractRuleElement {
}
if (annotation != null && iterator != null && iterator.isValid()) {
AnnotationFS pointer = iterator.get();
- if ((after && pointer.getEnd() == annotation.getEnd())
- || (!after && pointer.getBegin() == annotation.getBegin())) {
+ if ((after && pointer.getBegin() < annotation.getEnd())
+ || (!after && pointer.getEnd() > annotation.getBegin())) {
moveOn(after, iterator, stream);
}
}