You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by ma...@apache.org on 2026/07/08 18:32:12 UTC

(opennlp) branch main updated: OPENNLP-1882: Stop excluding stemmer tests and fix stale Turkish expectations (#1162)

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

mawiesne pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opennlp.git


The following commit(s) were added to refs/heads/main by this push:
     new 77fed15cc OPENNLP-1882: Stop excluding stemmer tests and fix stale Turkish expectations (#1162)
77fed15cc is described below

commit 77fed15cc3c56edb5f23b58eafed4de854269a35
Author: Kristian Rickert <kr...@gmail.com>
AuthorDate: Wed Jul 8 14:32:06 2026 -0400

    OPENNLP-1882: Stop excluding stemmer tests and fix stale Turkish expectations (#1162)
---
 opennlp-core/opennlp-cli/pom.xml                                   | 2 --
 opennlp-core/opennlp-formats/pom.xml                               | 2 --
 opennlp-core/opennlp-runtime/pom.xml                               | 2 --
 .../src/test/java/opennlp/tools/stemmer/SnowballStemmerTest.java   | 7 +++++--
 opennlp-tools/pom.xml                                              | 2 --
 pom.xml                                                            | 2 --
 6 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/opennlp-core/opennlp-cli/pom.xml b/opennlp-core/opennlp-cli/pom.xml
index d24a92f98..b96a77c36 100644
--- a/opennlp-core/opennlp-cli/pom.xml
+++ b/opennlp-core/opennlp-cli/pom.xml
@@ -123,8 +123,6 @@
           <forkCount>${opennlp.forkCount}</forkCount>
           <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
           <excludes>
-            <exclude>**/stemmer/*</exclude>
-            <exclude>**/stemmer/snowball/*</exclude>
             <exclude>**/*IT.java</exclude>
           </excludes>
         </configuration>
diff --git a/opennlp-core/opennlp-formats/pom.xml b/opennlp-core/opennlp-formats/pom.xml
index 95ae4e604..1b3a70f0a 100644
--- a/opennlp-core/opennlp-formats/pom.xml
+++ b/opennlp-core/opennlp-formats/pom.xml
@@ -95,8 +95,6 @@
           <forkCount>${opennlp.forkCount}</forkCount>
           <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
           <excludes>
-            <exclude>**/stemmer/*</exclude>
-            <exclude>**/stemmer/snowball/*</exclude>
             <exclude>**/*IT.java</exclude>
           </excludes>
         </configuration>
diff --git a/opennlp-core/opennlp-runtime/pom.xml b/opennlp-core/opennlp-runtime/pom.xml
index cfceb3c25..0dec48db8 100644
--- a/opennlp-core/opennlp-runtime/pom.xml
+++ b/opennlp-core/opennlp-runtime/pom.xml
@@ -108,8 +108,6 @@
           <forkCount>${opennlp.forkCount}</forkCount>
           <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
           <excludes>
-            <exclude>**/stemmer/*</exclude>
-            <exclude>**/stemmer/snowball/*</exclude>
             <exclude>**/*IT.java</exclude>
           </excludes>
         </configuration>
diff --git a/opennlp-core/opennlp-runtime/src/test/java/opennlp/tools/stemmer/SnowballStemmerTest.java b/opennlp-core/opennlp-runtime/src/test/java/opennlp/tools/stemmer/SnowballStemmerTest.java
index 3c9c56934..51fbcc23a 100644
--- a/opennlp-core/opennlp-runtime/src/test/java/opennlp/tools/stemmer/SnowballStemmerTest.java
+++ b/opennlp-core/opennlp-runtime/src/test/java/opennlp/tools/stemmer/SnowballStemmerTest.java
@@ -184,9 +184,12 @@ public class SnowballStemmerTest {
   @Test
   void testTurkish() {
     SnowballStemmer stemmer = new SnowballStemmer(ALGORITHM.TURKISH);
-    Assertions.assertEquals("ab'yle", stemmer.stem("ab'yle"));
+    // Expected values follow the reference data at
+    // https://github.com/snowballstem/snowball-data/tree/master/turkish: the Turkish algorithm
+    // removes proper-noun suffixes after an apostrophe (r_remove_proper_noun_suffix).
+    Assertions.assertEquals("ab", stemmer.stem("ab'yle"));
     Assertions.assertEquals("kaçmamak", stemmer.stem("kaçmamaktadır"));
-    Assertions.assertEquals("sarayı'nı", stemmer.stem("sarayı'nı"));
+    Assertions.assertEquals("sara", stemmer.stem("sarayı'nı"));
   }
 
   @Test
diff --git a/opennlp-tools/pom.xml b/opennlp-tools/pom.xml
index 0d5e4577b..feeb432b1 100644
--- a/opennlp-tools/pom.xml
+++ b/opennlp-tools/pom.xml
@@ -172,8 +172,6 @@
           <forkCount>${opennlp.forkCount}</forkCount>
           <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
           <excludes>
-            <exclude>**/stemmer/*</exclude>
-            <exclude>**/stemmer/snowball/*</exclude>
             <exclude>**/*IT.java</exclude>
           </excludes>
         </configuration>
diff --git a/pom.xml b/pom.xml
index c74e2dc02..b0878c3f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -365,8 +365,6 @@
 						<forkCount>${opennlp.forkCount}</forkCount>
 						<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
 						<excludes>
-							<exclude>**/stemmer/*</exclude>
-							<exclude>**/stemmer/snowball/*</exclude>
 							<exclude>**/*IT.java</exclude>
 						</excludes>
 					</configuration>