apache / apache/uima-ruta

setSimpleGreedyForComposed still buggy in ruta latest version

Open
#195 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
20
Forks
3
PR merge metrics
No merged PRs in 30d

Description

We are getting OOM issues for one of the ruta scripts and text.
On part of this we tried enabling the flag simpleGreedyForComposed and tried out and saw our existing test cases failing.

1. One of the batch of texts test case getting stuck and no movement.
2. one of the text(which has 13 email ids) with attached email ruta is getting below error:

java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because "match" is null
at org.apache.uima.ruta.rule.ComposedRuleElement.continueOwnMatch(ComposedRuleElement.java:387) ~[ruta-core-3.3.0.jar:?]
at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:479) ~[ruta-core-3.3.0.jar:?]
at org.apache.uima.ruta.rule.ComposedRuleElement.startMatch(ComposedRuleElement.java:112) ~[ruta-core-3.3.0.jar:?]
at org.apache.uima.ruta.rule.ComposedRuleElement.startMatch(ComposedRuleElement.java:79) ~[ruta-core-3.3.0.jar:?]
at org.apache.uima.ruta.rule.ComposedRuleElement.startMatch(ComposedRuleElement.java:79) ~[ruta-core-3.3.0.jar:?]
at org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:72) ~[ruta-core-3.3.0.jar:?]
at org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:63) ~[ruta-core-3.3.0.jar:?]
at org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:42) ~[ruta-core-3.3.0.jar:?]
at org.apache.uima.ruta.block.RutaScriptBlock.apply(RutaScriptBlock.java:74) ~[ruta-core-3.3.0.jar:?]

Email ruta is:

DocumentAnnotation{-> RETAINTYPE(SPACE)};

((W|NUM) (W|NUM)[0,1])+ "@" W+? PERIOD+? W{REGEXP("(?i)([a-zA-Z]{3}|[a-zA-Z]{2})") -> MARK(EntityType,1,5)};

((W|NUM) (W|NUM)[0,1])+ "@" W[0,1]? PERIOD[0,1]? W+? PERIOD+? W{REGEXP("(?i)([a-zA-Z]{3}|[a-zA-Z]{2})") -> MARK(EntityType,1,7)};

((W|NUM)+ ("."|"_") )+ (W|NUM)+ "@" W+? PERIOD+? W{REGEXP("(?i)([a-zA-Z]{3}|[a-zA-Z]{2})") -> MARK(EntityType,1,6)};

((W|NUM)+ ("."|"_") )+ (W|NUM)+ "@" W[0,1]? PERIOD[0,1]? W+? PERIOD+? W{REGEXP("(?i)([a-zA-Z]{3}|[a-zA-Z]{2})") -> MARK(EntityType,1,8)}

masked text is:

user1@example.com is my email id or user2@example.com or user3@example.com or user4@example.com or user5@example.com or user6@example.com.Hi my name is Joe. My email id is user7@example.com. My email id is user8@example.com. My email id is user9@example.com. My email id is also user10@example.comHi my new email id is user11@example.com and my alternate email ids are user12@example.com, user13@example.com, user14@example.com

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with org.apache.uima.ruta.rule.ComposedRuleElement, especially continueOwnMatch, fallbackContinue, and startMatch, using the supplied email Ruta script and masked text to reproduce the failure. Check the behavior with simpleGreedyForComposed enabled and verify that processing no longer stalls, runs out of memory, or throws the reported NullPointerException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.