This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a commit to branch opennlp-2.x
in repository https://gitbox.apache.org/repos/asf/opennlp.git


The following commit(s) were added to refs/heads/opennlp-2.x by this push:
     new a219be12 OPENNLP-53: Fix compile error in ParseTest on 2.x             
         The cherry-pick of 35227c72 referenced Parser.INC_NODE / 
Parser.TOK_NODE, which exist on main (where Parser was moved to opennlp-api as 
an interface declaring these constants) but not on the 2.x branch. Use 
AbstractBottomUpParser.INC_NODE / TOK_NODE instead, consistent with the rest of 
the 2.x parser code.
a219be12 is described below

commit a219be12ef2a63af127f4ab4db26bf98fe3c54f0
Author: Richard Zowalla <[email protected]>
AuthorDate: Wed Apr 15 10:55:41 2026 +0200

    OPENNLP-53: Fix compile error in ParseTest on 2.x                      The 
cherry-pick of 35227c72 referenced Parser.INC_NODE / Parser.TOK_NODE, which 
exist on main (where Parser was moved to opennlp-api as an interface declaring 
these constants) but not on the 2.x branch. Use AbstractBottomUpParser.INC_NODE 
/ TOK_NODE instead, consistent with the rest of the 2.x parser code.
---
 opennlp-tools/src/test/java/opennlp/tools/parser/ParseTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/opennlp-tools/src/test/java/opennlp/tools/parser/ParseTest.java 
b/opennlp-tools/src/test/java/opennlp/tools/parser/ParseTest.java
index bdf5b6de..9bdacb52 100644
--- a/opennlp-tools/src/test/java/opennlp/tools/parser/ParseTest.java
+++ b/opennlp-tools/src/test/java/opennlp/tools/parser/ParseTest.java
@@ -142,7 +142,7 @@ public class ParseTest {
     Assertions.assertEquals(new Span(0, 22), p.getSpan());
 
     // Verify root type is INC
-    Assertions.assertEquals(Parser.INC_NODE, p.getType());
+    Assertions.assertEquals(AbstractBottomUpParser.INC_NODE, p.getType());
 
     // Verify token children
     Parse[] children = p.getChildren();
@@ -150,7 +150,7 @@ public class ParseTest {
 
     int start = 0;
     for (int i = 0; i < tokens.length; i++) {
-      Assertions.assertEquals(Parser.TOK_NODE, children[i].getType());
+      Assertions.assertEquals(AbstractBottomUpParser.TOK_NODE, 
children[i].getType());
       Assertions.assertEquals(new Span(start, start + tokens[i].length()), 
children[i].getSpan());
       Assertions.assertEquals(tokens[i], children[i].getCoveredText());
       start += tokens[i].length() + 1;

Reply via email to