You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by rz...@apache.org on 2026/03/19 08:45:54 UTC

(opennlp) branch OPENNLP-1801 created (now 35e7a25e)

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

rzo1 pushed a change to branch OPENNLP-1801
in repository https://gitbox.apache.org/repos/asf/opennlp.git


      at 35e7a25e OPENNLP-1801: Extract eval tests into separate opennlp-eval-tests module

This branch includes the following new commits:

     new 35e7a25e OPENNLP-1801: Extract eval tests into separate opennlp-eval-tests module

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(opennlp) 01/01: OPENNLP-1801: Extract eval tests into separate opennlp-eval-tests module

Posted by rz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 35e7a25e09a3cdcf638493bbf07e67d8b93ec0b7
Author: Richard Zowalla <rz...@apache.org>
AuthorDate: Thu Mar 19 09:45:43 2026 +0100

    OPENNLP-1801: Extract eval tests into separate opennlp-eval-tests module
---
 opennlp-core/opennlp-ml/opennlp-dl-gpu/pom.xml     | 27 +-----
 .../opennlp-dl-gpu => opennlp-eval-tests}/pom.xml  | 96 +++++++++++++---------
 .../dl/doccat/DocumentCategorizerDLEval.java       |  4 +-
 .../opennlp/dl/namefinder/NameFinderDLEval.java    |  4 +-
 .../opennlp/dl/vectors/SentenceVectorsDLEval.java  |  4 +-
 .../java/opennlp/tools/eval/AbstractEvalTest.java  |  0
 .../opennlp/tools/eval/ArvoresDeitadasEval.java    |  0
 .../opennlp/tools/eval/Conll00ChunkerEval.java     |  0
 .../opennlp/tools/eval/Conll02NameFinderEval.java  |  0
 .../opennlp/tools/eval/ConllXPosTaggerEval.java    |  0
 .../tools/eval/GermEval2014NameFinderEval.java     |  0
 .../opennlp/tools/eval/MultiThreadedToolsEval.java |  0
 .../tools/eval/OntoNotes4NameFinderEval.java       |  0
 .../opennlp/tools/eval/OntoNotes4ParserEval.java   |  0
 .../tools/eval/OntoNotes4PosTaggerEval.java        |  0
 .../opennlp/tools/eval/SnowballTokenizerEval.java  |  0
 .../opennlp/tools/eval/SourceForgeModelEval.java   |  0
 .../tools/eval/UniversalDependency20Eval.java      |  0
 pom.xml                                            | 41 ++-------
 19 files changed, 70 insertions(+), 106 deletions(-)

diff --git a/opennlp-core/opennlp-ml/opennlp-dl-gpu/pom.xml b/opennlp-core/opennlp-ml/opennlp-dl-gpu/pom.xml
index 64a8bb2f..cf98bb01 100644
--- a/opennlp-core/opennlp-ml/opennlp-dl-gpu/pom.xml
+++ b/opennlp-core/opennlp-ml/opennlp-dl-gpu/pom.xml
@@ -102,30 +102,5 @@
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <id>eval-tests</id>
-      <properties>
-        <opennlp.forkCount>0.5C</opennlp.forkCount>
-      </properties>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <argLine>-Xmx4g</argLine>
-              <includes>
-                <include>**/*Test.java</include>
-                <include>**/*Eval.java</include>
-              </includes>
-              <dependenciesToScan>
-                <dependency>org.apache.opennlp:opennlp-dl</dependency>
-              </dependenciesToScan>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
+
 </project>
\ No newline at end of file
diff --git a/opennlp-core/opennlp-ml/opennlp-dl-gpu/pom.xml b/opennlp-eval-tests/pom.xml
similarity index 63%
copy from opennlp-core/opennlp-ml/opennlp-dl-gpu/pom.xml
copy to opennlp-eval-tests/pom.xml
index 64a8bb2f..59e0daab 100644
--- a/opennlp-core/opennlp-ml/opennlp-dl-gpu/pom.xml
+++ b/opennlp-eval-tests/pom.xml
@@ -21,49 +21,52 @@
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
+
   <parent>
     <groupId>org.apache.opennlp</groupId>
-    <artifactId>opennlp-ml</artifactId>
+    <artifactId>opennlp</artifactId>
     <version>3.0.0-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>
   </parent>
 
-  <artifactId>opennlp-dl-gpu</artifactId>
+  <artifactId>opennlp-eval-tests</artifactId>
   <packaging>jar</packaging>
-  <name>Apache OpenNLP :: Core :: ML :: Deep Learning (GPU)</name>
+  <name>Apache OpenNLP :: Eval Tests</name>
 
   <dependencies>
     <!-- Internal dependencies -->
     <dependency>
-      <artifactId>opennlp-api</artifactId>
-      <groupId>${project.groupId}</groupId>
-      <version>${project.version}</version>
+      <groupId>org.apache.opennlp</groupId>
+      <artifactId>opennlp-tools</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.opennlp</groupId>
+      <artifactId>opennlp-tools</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.opennlp</groupId>
       <artifactId>opennlp-dl</artifactId>
       <version>${project.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>com.microsoft.onnxruntime</groupId>
-          <artifactId>onnxruntime</artifactId>
-        </exclusion>
-      </exclusions>
+      <scope>test</scope>
     </dependency>
 
     <!-- External dependencies -->
     <dependency>
       <groupId>com.microsoft.onnxruntime</groupId>
-      <artifactId>onnxruntime_gpu</artifactId>
+      <artifactId>onnxruntime</artifactId>
       <version>${onnxruntime.version}</version>
+      <scope>test</scope>
     </dependency>
-
-    <!-- TEST scope -->
     <dependency>
-      <groupId>org.apache.opennlp</groupId>
-      <artifactId>opennlp-runtime</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
       <scope>test</scope>
     </dependency>
 
+    <!-- TEST scoped -->
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter-api</artifactId>
@@ -75,15 +78,8 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.opennlp</groupId>
-      <artifactId>opennlp-dl</artifactId>
-      <version>${project.version}</version>
-      <type>test-jar</type>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-params</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>
@@ -94,9 +90,34 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <dependenciesToScan>
-            <dependency>org.apache.opennlp:opennlp-dl</dependency>
-          </dependenciesToScan>
+          <argLine>-Xmx4g</argLine>
+          <forkCount>${opennlp.forkCount}</forkCount>
+          <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
+          <includes>
+            <include>**/*Eval.java</include>
+          </includes>
+          <excludedGroups>opennlp.tools.HighMemoryUsage</excludedGroups>
+        </configuration>
+      </plugin>
+
+      <!-- No javadoc or source jars needed for test-only module -->
+      <plugin>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-source-plugin</artifactId>
+        <configuration>
+          <skipSource>true</skipSource>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <skipIfEmpty>true</skipIfEmpty>
         </configuration>
       </plugin>
     </plugins>
@@ -104,28 +125,25 @@
 
   <profiles>
     <profile>
-      <id>eval-tests</id>
-      <properties>
-        <opennlp.forkCount>0.5C</opennlp.forkCount>
-      </properties>
+      <id>high-memory-tests</id>
       <build>
         <plugins>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-surefire-plugin</artifactId>
             <configuration>
-              <argLine>-Xmx4g</argLine>
+              <argLine>-Xmx20g</argLine>
+              <forkCount>1</forkCount>
               <includes>
-                <include>**/*Test.java</include>
                 <include>**/*Eval.java</include>
               </includes>
-              <dependenciesToScan>
-                <dependency>org.apache.opennlp:opennlp-dl</dependency>
-              </dependenciesToScan>
+              <excludedGroups combine.self="override"/>
+              <groups>opennlp.tools.HighMemoryUsage</groups>
             </configuration>
           </plugin>
         </plugins>
       </build>
     </profile>
   </profiles>
-</project>
\ No newline at end of file
+
+</project>
diff --git a/opennlp-core/opennlp-ml/opennlp-dl/src/test/java/opennlp/dl/doccat/DocumentCategorizerDLEval.java b/opennlp-eval-tests/src/test/java/opennlp/dl/doccat/DocumentCategorizerDLEval.java
similarity index 99%
rename from opennlp-core/opennlp-ml/opennlp-dl/src/test/java/opennlp/dl/doccat/DocumentCategorizerDLEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/dl/doccat/DocumentCategorizerDLEval.java
index 6f86e8f9..f1d2b84d 100644
--- a/opennlp-core/opennlp-ml/opennlp-dl/src/test/java/opennlp/dl/doccat/DocumentCategorizerDLEval.java
+++ b/opennlp-eval-tests/src/test/java/opennlp/dl/doccat/DocumentCategorizerDLEval.java
@@ -31,11 +31,11 @@ import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import opennlp.dl.AbstractDLTest;
 import opennlp.dl.InferenceOptions;
 import opennlp.dl.doccat.scoring.AverageClassificationScoringStrategy;
+import opennlp.tools.eval.AbstractEvalTest;
 
-public class DocumentCategorizerDLEval extends AbstractDLTest {
+public class DocumentCategorizerDLEval extends AbstractEvalTest {
 
   private static final Logger logger = LoggerFactory.getLogger(DocumentCategorizerDLEval.class);
 
diff --git a/opennlp-core/opennlp-ml/opennlp-dl/src/test/java/opennlp/dl/namefinder/NameFinderDLEval.java b/opennlp-eval-tests/src/test/java/opennlp/dl/namefinder/NameFinderDLEval.java
similarity index 98%
rename from opennlp-core/opennlp-ml/opennlp-dl/src/test/java/opennlp/dl/namefinder/NameFinderDLEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/dl/namefinder/NameFinderDLEval.java
index 779da33f..79b1bcf7 100644
--- a/opennlp-core/opennlp-ml/opennlp-dl/src/test/java/opennlp/dl/namefinder/NameFinderDLEval.java
+++ b/opennlp-eval-tests/src/test/java/opennlp/dl/namefinder/NameFinderDLEval.java
@@ -28,12 +28,12 @@ import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import opennlp.dl.AbstractDLTest;
+import opennlp.tools.eval.AbstractEvalTest;
 import opennlp.tools.sentdetect.SentenceDetector;
 import opennlp.tools.sentdetect.SentenceDetectorME;
 import opennlp.tools.util.Span;
 
-public class NameFinderDLEval extends AbstractDLTest {
+public class NameFinderDLEval extends AbstractEvalTest {
 
   private static final Logger logger = LoggerFactory.getLogger(NameFinderDLEval.class);
   private final SentenceDetector sentenceDetector;
diff --git a/opennlp-core/opennlp-ml/opennlp-dl/src/test/java/opennlp/dl/vectors/SentenceVectorsDLEval.java b/opennlp-eval-tests/src/test/java/opennlp/dl/vectors/SentenceVectorsDLEval.java
similarity index 94%
rename from opennlp-core/opennlp-ml/opennlp-dl/src/test/java/opennlp/dl/vectors/SentenceVectorsDLEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/dl/vectors/SentenceVectorsDLEval.java
index b7c92e1c..286a092d 100644
--- a/opennlp-core/opennlp-ml/opennlp-dl/src/test/java/opennlp/dl/vectors/SentenceVectorsDLEval.java
+++ b/opennlp-eval-tests/src/test/java/opennlp/dl/vectors/SentenceVectorsDLEval.java
@@ -22,9 +22,9 @@ import java.io.File;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
-import opennlp.dl.AbstractDLTest;
+import opennlp.tools.eval.AbstractEvalTest;
 
-public class SentenceVectorsDLEval extends AbstractDLTest {
+public class SentenceVectorsDLEval extends AbstractEvalTest {
 
   @Test
   public void generateVectorsTest() throws Exception {
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/AbstractEvalTest.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/AbstractEvalTest.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/AbstractEvalTest.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/AbstractEvalTest.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/ArvoresDeitadasEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/ArvoresDeitadasEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/ArvoresDeitadasEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/ArvoresDeitadasEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/Conll00ChunkerEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/Conll00ChunkerEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/Conll00ChunkerEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/Conll00ChunkerEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/Conll02NameFinderEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/Conll02NameFinderEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/Conll02NameFinderEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/Conll02NameFinderEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/ConllXPosTaggerEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/ConllXPosTaggerEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/ConllXPosTaggerEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/ConllXPosTaggerEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/GermEval2014NameFinderEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/GermEval2014NameFinderEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/GermEval2014NameFinderEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/GermEval2014NameFinderEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/MultiThreadedToolsEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/MultiThreadedToolsEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/MultiThreadedToolsEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/MultiThreadedToolsEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/OntoNotes4NameFinderEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/OntoNotes4NameFinderEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/OntoNotes4NameFinderEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/OntoNotes4NameFinderEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/OntoNotes4ParserEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/OntoNotes4ParserEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/OntoNotes4ParserEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/OntoNotes4ParserEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/OntoNotes4PosTaggerEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/OntoNotes4PosTaggerEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/OntoNotes4PosTaggerEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/OntoNotes4PosTaggerEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/SnowballTokenizerEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/SnowballTokenizerEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/SnowballTokenizerEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/SnowballTokenizerEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/SourceForgeModelEval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/SourceForgeModelEval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/SourceForgeModelEval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/SourceForgeModelEval.java
diff --git a/opennlp-tools/src/test/java/opennlp/tools/eval/UniversalDependency20Eval.java b/opennlp-eval-tests/src/test/java/opennlp/tools/eval/UniversalDependency20Eval.java
similarity index 100%
rename from opennlp-tools/src/test/java/opennlp/tools/eval/UniversalDependency20Eval.java
rename to opennlp-eval-tests/src/test/java/opennlp/tools/eval/UniversalDependency20Eval.java
diff --git a/pom.xml b/pom.xml
index 177a5af1..9c89b671 100644
--- a/pom.xml
+++ b/pom.xml
@@ -685,45 +685,16 @@
 			<properties>
 				<opennlp.forkCount>0.5C</opennlp.forkCount>
 			</properties>
-			<build>
-				<plugins>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-surefire-plugin</artifactId>
-						<configuration>
-							<argLine>-Xmx4g</argLine>
-							<includes>
-								<include>**/*Test.java</include>
-								<include>**/*Eval.java</include>
-							</includes>
-							<excludedGroups>opennlp.tools.HighMemoryUsage</excludedGroups>
-						</configuration>
-					</plugin>
-				</plugins>
-			</build>
+			<modules>
+				<module>opennlp-eval-tests</module>
+			</modules>
 		</profile>
 
 		<profile>
 			<id>high-memory-tests</id>
-			<properties>
-				<opennlp.forkCount>1</opennlp.forkCount>
-			</properties>
-			<build>
-				<plugins>
-					<plugin>
-						<groupId>org.apache.maven.plugins</groupId>
-						<artifactId>maven-surefire-plugin</artifactId>
-						<configuration>
-							<argLine>-Xmx20g</argLine>
-							<includes>
-								<include>**/*Test.java</include>
-								<include>**/*Eval.java</include>
-							</includes>
-							<groups>opennlp.tools.HighMemoryUsage</groups>
-						</configuration>
-					</plugin>
-				</plugins>
-			</build>
+			<modules>
+				<module>opennlp-eval-tests</module>
+			</modules>
 		</profile>
 	</profiles>