You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by kr...@apache.org on 2026/08/15 00:14:41 UTC
(opennlp) 05/14: Merge PR #1155 head into OPENNLP-1833-grpc-helper
This is an automated email from the ASF dual-hosted git repository.
krickert pushed a commit to branch OPENNLP-1833-grpc-helper
in repository https://gitbox.apache.org/repos/asf/opennlp.git
commit f2174d25bde2b5c5aedcf8c5bb62f594e927d046
Merge: 03baf568d c678d6579
Author: Kristian Rickert <kr...@gmail.com>
AuthorDate: Fri Aug 14 20:01:59 2026 -0400
Merge PR #1155 head into OPENNLP-1833-grpc-helper
# Conflicts:
# opennlp-distr/pom.xml
# opennlp-distr/src/main/assembly/bin.xml
# opennlp-docs/src/docbkx/opennlp.xml
# pom.xml
# rat-excludes
.../tools/wordnet/LexicalKnowledgeBase.java | 85 +++
.../main/java/opennlp/tools/wordnet/Synset.java | 123 ++++
.../java/opennlp/tools/wordnet/WordNetPOS.java | 40 ++
.../opennlp/tools/wordnet/WordNetRelation.java | 115 ++++
.../tools/wordnet/LexicalKnowledgeBaseTest.java | 105 ++++
.../java/opennlp/tools/wordnet/SynsetTest.java | 150 +++++
opennlp-distr/pom.xml | 5 +
opennlp-distr/src/main/assembly/bin.xml | 7 +
opennlp-docs/src/docbkx/opennlp.xml | 1 +
opennlp-docs/src/docbkx/wordnet.xml | 106 ++++
opennlp-extensions/{ => opennlp-wordnet}/pom.xml | 52 +-
.../opennlp/wordnet/InMemoryWordNetLexicon.java | 157 +++++
.../main/java/opennlp/wordnet/LemmaFolding.java | 75 +++
.../java/opennlp/wordnet/MorphyExceptions.java | 145 +++++
.../java/opennlp/wordnet/MorphyLemmatizer.java | 241 ++++++++
.../src/main/java/opennlp/wordnet/WnLmfReader.java | 618 ++++++++++++++++++++
.../src/main/java/opennlp/wordnet/WndbReader.java | 642 +++++++++++++++++++++
.../wordnet/InMemoryWordNetLexiconTest.java | 89 +++
.../java/opennlp/wordnet/LemmaFoldingTest.java | 71 +++
.../opennlp/wordnet/LexiconConcurrencyTest.java | 91 +++
.../java/opennlp/wordnet/MorphyExceptionsTest.java | 129 +++++
.../java/opennlp/wordnet/MorphyLemmatizerTest.java | 203 +++++++
.../opennlp/wordnet/ReaderEquivalenceTest.java | 121 ++++
.../test/java/opennlp/wordnet/WnLmfReaderTest.java | 387 +++++++++++++
.../test/java/opennlp/wordnet/WndbReaderTest.java | 311 ++++++++++
.../opennlp/wordnet/WordNetUsageExampleTest.java | 101 ++++
.../test/resources/opennlp/wordnet/mini-wn-lmf.xml | 183 ++++++
.../opennlp/wordnet/mini-wndb/.gitattributes | 7 +
.../resources/opennlp/wordnet/mini-wndb/adj.exc | 1 +
.../resources/opennlp/wordnet/mini-wndb/adv.exc | 1 +
.../resources/opennlp/wordnet/mini-wndb/data.adj | 22 +
.../resources/opennlp/wordnet/mini-wndb/data.adv | 20 +
.../resources/opennlp/wordnet/mini-wndb/data.noun | 27 +
.../resources/opennlp/wordnet/mini-wndb/data.verb | 22 +
.../resources/opennlp/wordnet/mini-wndb/index.adj | 22 +
.../resources/opennlp/wordnet/mini-wndb/index.adv | 20 +
.../resources/opennlp/wordnet/mini-wndb/index.noun | 27 +
.../resources/opennlp/wordnet/mini-wndb/index.verb | 22 +
.../resources/opennlp/wordnet/mini-wndb/noun.exc | 4 +
.../resources/opennlp/wordnet/mini-wndb/verb.exc | 4 +
opennlp-extensions/pom.xml | 1 +
pom.xml | 6 +
rat-excludes | 8 +
43 files changed, 4546 insertions(+), 21 deletions(-)
diff --cc opennlp-distr/pom.xml
index 71e47e43a,39269575e..a45bbf89c
--- a/opennlp-distr/pom.xml
+++ b/opennlp-distr/pom.xml
@@@ -95,16 -91,11 +95,21 @@@
<groupId>org.apache.opennlp</groupId>
<artifactId>opennlp-spellcheck</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.opennlp</groupId>
+ <artifactId>opennlp-subword</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.opennlp</groupId>
+ <artifactId>opennlp-embeddings</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.opennlp</groupId>
+ <artifactId>opennlp-wordnet</artifactId>
+ </dependency>
+
<!-- OpenNLP Docs - Ensure that "docs" are build before distribution -->
<dependency>
<groupId>org.apache.opennlp</groupId>
diff --cc opennlp-distr/src/main/assembly/bin.xml
index ad465a18d,36c556d47..62be4dbb6
--- a/opennlp-distr/src/main/assembly/bin.xml
+++ b/opennlp-distr/src/main/assembly/bin.xml
@@@ -253,13 -239,13 +253,20 @@@
<outputDirectory>docs/apidocs/opennlp-spellcheck</outputDirectory>
</fileSet>
+ <fileSet>
+ <directory>../opennlp-extensions/opennlp-subword/target/reports/apidocs</directory>
+ <fileMode>644</fileMode>
+ <directoryMode>755</directoryMode>
+ <outputDirectory>docs/apidocs/opennlp-subword</outputDirectory>
+ </fileSet>
+
+ <fileSet>
+ <directory>../opennlp-extensions/opennlp-wordnet/target/reports/apidocs</directory>
+ <fileMode>644</fileMode>
+ <directoryMode>755</directoryMode>
+ <outputDirectory>docs/apidocs/opennlp-wordnet</outputDirectory>
+ </fileSet>
+
<fileSet>
<directory>../opennlp-extensions/opennlp-uima/target/reports/apidocs</directory>
<fileMode>644</fileMode>
diff --cc opennlp-docs/src/docbkx/opennlp.xml
index 5448c20fe,f7a8a3940..3a2bbcda3
--- a/opennlp-docs/src/docbkx/opennlp.xml
+++ b/opennlp-docs/src/docbkx/opennlp.xml
@@@ -109,7 -109,7 +109,8 @@@ under the License
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./postagger.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./lemmatizer.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./stemmer.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./wordnet.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./document.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./spellcheck.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./chunker.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="./parser.xml" />
diff --cc opennlp-extensions/pom.xml
index db6cfa7ff,8c0e432a5..f27f84bfc
--- a/opennlp-extensions/pom.xml
+++ b/opennlp-extensions/pom.xml
@@@ -38,12 -38,10 +38,13 @@@
</properties>
<modules>
+ <module>opennlp-embeddings</module>
+ <module>opennlp-geo</module>
<module>opennlp-morfologik</module>
<module>opennlp-spellcheck</module>
+ <module>opennlp-subword</module>
<module>opennlp-uima</module>
+ <module>opennlp-wordnet</module>
</modules>
</project>
diff --cc pom.xml
index 0a2c79982,6c1863811..57ed91c36
--- a/pom.xml
+++ b/pom.xml
@@@ -223,10 -216,10 +223,16 @@@
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <artifactId>opennlp-subword</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <version>${project.version}</version>
++ </dependency>
++
+ <dependency>
+ <artifactId>opennlp-wordnet</artifactId>
+ <groupId>${project.groupId}</groupId>
+ <version>${project.version}</version>
</dependency>
<dependency>
diff --cc rat-excludes
index 7d32a5724,561869bd4..0fc8287ba
--- a/rat-excludes
+++ b/rat-excludes
@@@ -71,16 -71,11 +71,24 @@@ src/main/resources/opennlp/tools/tokeni
src/main/resources/opennlp/tools/util/normalizer/confusables.txt
src/test/resources/opennlp/tools/tokenize/uax29/WordBreakTest.txt
+<!-- opennlp-dl tiny ONNX test model (project-generated binary, see gen_tiny_vectors_model.py committed next to it) -->
+src/test/resources/opennlp/dl/vectors/tiny-vectors.onnx
+<!-- opennlp-subword bundled test models and fixtures (project-generated binaries and data) -->
+src/test/resources/opennlp/subword/sentencepiece/*.model
+src/test/resources/opennlp/subword/sentencepiece/*.fixtures.tsv
+src/test/resources/opennlp/subword/sentencepiece/corpus.txt
+<!-- opennlp-embeddings copy of the opennlp-subword tiny SentencePiece test model -->
+src/test/resources/opennlp/embeddings/tiny-unigram.model
+<!-- opennlp-embeddings parity harness input sentences (data file, no AL header possible) -->
+dev/embeddings/parity/sentences.txt
+<!-- OPENNLP-1879 bundled Natural Earth gazetteer table (public domain data;
+ the file header carries the derivation record and the LICENSE pointer) -->
+src/main/resources/opennlp/geo/naturalearth-populated-places.txt
+ <!-- Miniature WNDB morphology exception-list fixtures; the *.exc format is bare
+ "inflected base" lines with no comment syntax, so no header can be carried.
+ The index.* and data.* fixtures in the same directory do carry the header
+ in their space-prefixed WNDB license preamble and are not excluded. -->
+ src/test/resources/opennlp/wordnet/mini-wndb/noun.exc
+ src/test/resources/opennlp/wordnet/mini-wndb/verb.exc
+ src/test/resources/opennlp/wordnet/mini-wndb/adj.exc
+ src/test/resources/opennlp/wordnet/mini-wndb/adv.exc