Skip to content

Commit bdc4ed7

Browse files
committed
Squashed commit of the following:
commit 52955e9 Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Sat Jun 14 18:50:09 2025 +0100 OPENNLP-1745: SentenceDetector - Add Junit test for useTokenEnd = false commit fe59eb9 Merge: 67ac7b2 05f69a4 Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Sat Jun 14 07:29:36 2025 +0100 Merge remote-tracking branch 'origin/main' commit 05f69a4 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jun 9 11:49:38 2025 +0200 OPENNLP-1724: Update JUnit to 5.13.1 (#790) Bumps `junit.version` from 5.13.0 to 5.13.1. Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.0 to 5.13.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.13.0...r5.13.1) Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.0 to 5.13.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.13.0...r5.13.1) Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.0 to 5.13.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.13.0...r5.13.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-version: 5.13.1 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-version: 5.13.1 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.13.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 32f4ef7 Author: Richard Zowalla <13417392+rzo1@users.noreply.github.com> Date: Sat Jun 7 21:21:36 2025 +0200 Disable merge request requirement for opennlp-2.x (#789) commit 8abfe0d Author: Richard Zowalla <13417392+rzo1@users.noreply.github.com> Date: Sat Jun 7 20:45:08 2025 +0200 Remove code review requirement for 2.x branch to allow cherry picking already reviewed commits. (#788) commit 89e4260 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jun 2 09:17:43 2025 +0200 OPENNLP-1724: Update JUnit to 5.13.0 (#787) Bumps `junit.version` from 5.12.2 to 5.13.0. Updates `org.junit.jupiter:junit-jupiter-api` from 5.12.2 to 5.13.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.12.2...r5.13.0) Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.2 to 5.13.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.12.2...r5.13.0) Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.12.2...r5.13.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-version: 5.13.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-version: 5.13.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-version: 5.13.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 2c8e58b Author: Martin Wiesner <mawiesne@users.noreply.github.com> Date: Sat May 24 20:59:20 2025 +0200 OPENNLP-1708: Raise OpenNLP version to 3.x on main branch (#785) * OPENNLP-1708: Raise OpenNLP version to 3.x on main branch - adjusts all pom.xml files towards 3.0.0-SNAPSHOT - adjusts upper major model version to 3.x - adds static method Version#between for simpler version range checks in BaseModel - adds 'opennlp-2.x' branch to protected branches in .asf.yml - updates README.md with infos on 'Branches and Merging Strategy' - cures a typo - adds external link to the ONNX website commit 0db3c10 Author: Richard Zowalla <13417392+rzo1@users.noreply.github.com> Date: Tue May 20 21:35:27 2025 +0200 OPENNLP-1545 - Close ZipInputStream in BaseModel (#784) commit 2ed9949 Author: Martin Wiesner <mawiesne@users.noreply.github.com> Date: Tue May 20 16:26:59 2025 +0200 OPENNLP-1734: Adjust GH CI config to build with Java 25-ea (#781) commit 5eec98c Author: NishantShri4 <45672680+NishantShri4@users.noreply.github.com> Date: Thu May 15 09:25:06 2025 +0100 OPENNLP-1731: Add Junits for NGramLanguageModelTool (#778) * OPENNLP-1731: Add Junits for NGramLanguageModelTool * OPENNLP-1731: AbstractLoggerTest : Corrected a javadoc comment. * OPENNLP-1731: Add Junits for NGramLanguageModelTool * OPENNLP-1731: AbstractLoggerTest : Corrected a javadoc comment. * OPENNLP-1731: Fixed a Generic RawType warning. * OPENNLP-1731: Rebased against upstream. * OPENNLP-1731: Rebased against upstream. * OPENNLP-1731: Rebased against upstream (removed extra new line). * OPENNLP-1731: Removed an extra newline. commit 67ac7b2 Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Mon May 12 20:23:00 2025 +0100 OPENNLP-1731: Removed an extra newline. commit 0d95dd9 Merge: 35de220 2580a20 Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Mon May 12 20:20:59 2025 +0100 Merge remote-tracking branch 'origin/main' # Conflicts: # opennlp-tools/src/test/java/opennlp/tools/AbstractLoggerTest.java commit 35de220 Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Mon May 12 20:19:54 2025 +0100 OPENNLP-1731: Rebased against upstream (removed extra new line). commit e09f2ad Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Mon May 12 20:18:29 2025 +0100 OPENNLP-1731: Rebased against upstream. commit 6d84e2f Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Mon May 12 20:16:21 2025 +0100 OPENNLP-1731: Rebased against upstream. commit 2580a20 Merge: 0a20ef5 46d2d78 Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Mon May 12 20:09:17 2025 +0100 Merge remote-tracking branch 'origin/main' # Conflicts: # opennlp-tools/src/test/java/opennlp/tools/monitoring/DefaultTrainingProgressMonitorTest.java commit 0a20ef5 Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Mon May 12 20:06:51 2025 +0100 OPENNLP-1731: Fixed a Generic RawType warning. commit cfa425f Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Sun May 11 17:32:59 2025 +0100 OPENNLP-1731: AbstractLoggerTest : Corrected a javadoc comment. commit a7eb44a Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Sat May 10 23:24:16 2025 +0100 OPENNLP-1731: Add Junits for NGramLanguageModelTool commit f7be29d Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon May 12 20:35:53 2025 +0200 Minor: Regenerated NOTICE File for 21a2a2a (#783) Signed-off-by: GitHub <noreply@github.com> Co-authored-by: mawiesne <mawiesne@users.noreply.github.com> commit 21a2a2a Author: Martin Wiesner <mawiesne@users.noreply.github.com> Date: Mon May 12 20:34:19 2025 +0200 OPENNLP-1733: Remove implements Serializable from LanguageDetector (#780) commit 7c72cb0 Author: Martin Wiesner <mawiesne@users.noreply.github.com> Date: Mon May 12 20:32:46 2025 +0200 OPENNLP-1732: Eliminate use of raw types for StopCriteria (#779) commit e4f5ce2 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 12 20:32:10 2025 +0200 OPENNLP-1730: Update ONNX runtime to 1.22.0 (#782) Bumps `onnxruntime.version` from 1.21.1 to 1.22.0. Updates `com.microsoft.onnxruntime:onnxruntime` from 1.21.1 to 1.22.0 - [Release notes](https://github.com/microsoft/onnxruntime/releases) - [Changelog](https://github.com/microsoft/onnxruntime/blob/main/docs/ReleaseManagement.md) - [Commits](microsoft/onnxruntime@v1.21.1...v1.22.0) Updates `com.microsoft.onnxruntime:onnxruntime_gpu` from 1.21.1 to 1.22.0 - [Release notes](https://github.com/microsoft/onnxruntime/releases) - [Changelog](https://github.com/microsoft/onnxruntime/blob/main/docs/ReleaseManagement.md) - [Commits](microsoft/onnxruntime@v1.21.1...v1.22.0) --- updated-dependencies: - dependency-name: com.microsoft.onnxruntime:onnxruntime dependency-version: 1.22.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.microsoft.onnxruntime:onnxruntime_gpu dependency-version: 1.22.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 46d2d78 Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Sun May 11 17:32:59 2025 +0100 OPENNLP-1731: AbstractLoggerTest : Corrected a javadoc comment. commit 01a4695 Author: Nishant Shrivastava <shrivastava.nishant@gmail.com> Date: Sat May 10 23:24:16 2025 +0100 OPENNLP-1731: Add Junits for NGramLanguageModelTool commit 1675317 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed Apr 30 18:16:50 2025 +0200 Minor: Regenerated NOTICE File for 95cd7c8 (#776) Signed-off-by: GitHub <noreply@github.com> Co-authored-by: mawiesne <mawiesne@users.noreply.github.com> commit 95cd7c8 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Apr 30 18:15:51 2025 +0200 OPENNLP-1730: Update ONNX runtime to 1.21.1 (#774) Bumps `onnxruntime.version` from 1.21.0 to 1.21.1. Updates `com.microsoft.onnxruntime:onnxruntime` from 1.21.0 to 1.21.1 - [Release notes](https://github.com/microsoft/onnxruntime/releases) - [Changelog](https://github.com/microsoft/onnxruntime/blob/main/docs/ReleaseManagement.md) - [Commits](microsoft/onnxruntime@v1.21.0...v1.21.1) Updates `com.microsoft.onnxruntime:onnxruntime_gpu` from 1.21.0 to 1.21.1 - [Release notes](https://github.com/microsoft/onnxruntime/releases) - [Changelog](https://github.com/microsoft/onnxruntime/blob/main/docs/ReleaseManagement.md) - [Commits](microsoft/onnxruntime@v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: com.microsoft.onnxruntime:onnxruntime dependency-version: 1.21.1 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.microsoft.onnxruntime:onnxruntime_gpu dependency-version: 1.21.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 7c85b94 Author: Martin Wiesner <mawiesne@users.noreply.github.com> Date: Wed Apr 30 18:12:19 2025 +0200 OPENNLP-1729: Provide easier loading of Models for given model lang and type (#775) - extracts ModelType from DownloadUtil - adds new methods to ClassPathModelLoader to obtain actual model instances easily - adds ClassPathModelProvider interface - adds DefaultClassPathModelProvider which combines existing classes to achieve easier access to model objects via classpath loading - adds JUnit tests for the new classes - adds and improves JavaDoc commit 28e2de6 Author: NishantShri4 <45672680+NishantShri4@users.noreply.github.com> Date: Fri Apr 25 18:59:14 2025 +0100 OPENNLP-124: Maxent/Perceptron training should report progress back via an API (#758) * OPENNLP-124 : Maxent/Perceptron training should report progress back via an API * OPENNLP-124 : Fixed Review Comments * OPENNLP-124 : Updated javadoc for the new Trainer.init method commit 2720a1b Author: Martin Wiesner <mawiesne@users.noreply.github.com> Date: Fri Apr 25 17:32:20 2025 +0200 OPENNLP-1728: Improve JavaDoc of opennlp.tools.models package (#772) commit e1843dc Author: Martin Wiesner <mawiesne@users.noreply.github.com> Date: Wed Apr 23 21:42:29 2025 +0200 OPENNLP-1727: Correct example snippet for loading a model from the classpath (#771)
1 parent 38d141d commit bdc4ed7

File tree

81 files changed

+1937
-283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1937
-283
lines changed

.asf.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ github:
1212
dismiss_stale_reviews: false
1313
require_code_owner_reviews: false
1414
required_approving_review_count: 1
15+
opennlp-2.x: {}
1516
autolink_jira:
1617
- OPENNLP
1718
custom_subjects:

.github/workflows/maven.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
java: [ 17, 21 ]
3535
experimental: [false]
3636
include:
37-
- java: 24-ea
37+
- java: 25-ea
3838
os: ubuntu-latest
3939
experimental: true
4040

@@ -49,11 +49,11 @@ jobs:
4949
restore-keys: |
5050
${{ runner.os }}-maven-
5151
- name: Set up JDK ${{ matrix.java }}
52-
uses: actions/setup-java@v4
52+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
5353
with:
5454
distribution: temurin
5555
java-version: ${{ matrix.java }}
5656
- name: Build with Maven
57-
run: mvn -V clean test install --no-transfer-progress -Pjacoco -Pci
57+
run: mvn -V clean test install --show-version --batch-mode --no-transfer-progress -Pjacoco -Pci
5858
- name: Jacoco
5959
run: mvn jacoco:report

NOTICE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ List of third-party dependencies grouped by their license type.
6161

6262
MIT License
6363

64-
* onnx-runtime (com.microsoft.onnxruntime:onnxruntime_gpu:1.21.0 - https://microsoft.github.io/onnxruntime/)
65-
* onnx-runtime (com.microsoft.onnxruntime:onnxruntime:1.21.0 - https://microsoft.github.io/onnxruntime/)
64+
* onnx-runtime (com.microsoft.onnxruntime:onnxruntime_gpu:1.22.0 - https://microsoft.github.io/onnxruntime/)
65+
* onnx-runtime (com.microsoft.onnxruntime:onnxruntime:1.22.0 - https://microsoft.github.io/onnxruntime/)
6666
* SLF4J API Module (org.slf4j:slf4j-api:2.0.17 - http://www.slf4j.org)
6767

6868
The MIT License (MIT)

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ Currently, the library has different packages:
7171
* `opennlp-tools` : The core toolkit.
7272
* `opennlp-tools-models` : A set of classes to load [OpenNLP models](https://github.com/apache/opennlp-models) from the classpath.
7373
* `opennlp-uima` : A set of [Apache UIMA](https://uima.apache.org) annotators.
74-
* `opennlp-morfologik-addon` : An addon for Morfologik
75-
* `opennlp-dl` : OpenNLP interface implementations for ONNX models using the `onnxruntime` dependency.
74+
* `opennlp-morfologik-addon` : An addon for _Morfologik_.
75+
* `opennlp-dl` : OpenNLP interface implementations for [ONNX](https://onnx.ai) models using the `onnxruntime` dependency.
7676
* `opennlp-dl-gpu` : Replaces `onnxruntime` with the `onnxruntime_gpu` dependency to support GPU acceleration.
77-
* `opennlp-sandbox`: Other projects in progress are found in the [sandbox](https://github.com/apache/opennlp-sandbox)
77+
* `opennlp-sandbox`: Other projects in progress reside in the [sandbox](https://github.com/apache/opennlp-sandbox).
7878

7979
## Getting Started
8080

@@ -104,6 +104,28 @@ compile group: "org.apache.opennlp", name: "opennlp-tools", version: "${opennlp.
104104

105105
For more details please check our [documentation](http://opennlp.apache.org/docs/)
106106

107+
## Branches and Merging Strategy
108+
109+
To support ongoing development and stable maintenance of Apache OpenNLP, the project follows a dual-branch model:
110+
111+
### Branch overview
112+
113+
- **`main`**: Development branch for version **3.0** and beyond. All feature development and 3.x releases occur here.
114+
- **`opennlp-2.x`**: Maintains the stable **2.x** release line. This branch will receive selective updates and patch releases.
115+
116+
### Workflow summary
117+
118+
- Feature development
119+
- New features targeting versions 3.0+ are developed on feature branches _off_ `main` and merged _into_ `main`.
120+
- Bug fixes and dependency updates
121+
- Relevant fixes or dependency updates from `main` may be cherry-picked into `opennlp-2.x` as needed.
122+
- Releases
123+
- **3.x** releases are made from the `main` branch.
124+
- **2.x** releases are made from the `opennlp-2.x` branch.
125+
- Release tags
126+
- Release tags are applied directly to the appropriate version branch (`main` for 3.x or `opennlp-2.x` for 2.x).
127+
- The presence of a version branch does not affect the tagging or visibility of releases.
128+
107129
## Building OpenNLP
108130

109131
At least JDK 17 and Maven 3.3.9 are required to build the library.
@@ -114,12 +136,14 @@ After cloning the repository go into the destination directory and run:
114136
mvn install
115137
```
116138

117-
### Additional Developement Information
139+
### Additional Development Information
118140

119-
- [Building and Integrating Snowball Stemmer for OpenNLP](dev/Snowball-Stemmer.md)
141+
- Building and integrating [Snowball Stemmer](dev/Snowball-Stemmer.md) for OpenNLP.
120142

121143
## Contributing
122144

123-
The Apache OpenNLP project is developed by volunteers and is always looking for new contributors to work on all parts of the project. Every contribution is welcome and needed to make it better. A contribution can be anything from a small documentation typo fix to a new component.
145+
The Apache OpenNLP project is developed by volunteers and is always looking for new contributors to work on all parts of the project.
146+
Every contribution is welcome and needed to make it better.
147+
A contribution can be anything from a small documentation typo fix to a new component.
124148

125149
If you would like to get involved please follow the instructions [here](https://github.com/apache/opennlp/blob/main/.github/CONTRIBUTING.md)

opennlp-distr/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.opennlp</groupId>
2626
<artifactId>opennlp</artifactId>
27-
<version>2.5.5-SNAPSHOT</version>
27+
<version>3.0.0-SNAPSHOT</version>
2828
<relativePath>../pom.xml</relativePath>
2929
</parent>
3030

opennlp-dl-gpu/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.opennlp</groupId>
2626
<artifactId>opennlp</artifactId>
27-
<version>2.5.5-SNAPSHOT</version>
27+
<version>3.0.0-SNAPSHOT</version>
2828
<relativePath>../pom.xml</relativePath>
2929
</parent>
3030
<groupId>org.apache.opennlp</groupId>

opennlp-dl/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.opennlp</groupId>
2626
<artifactId>opennlp</artifactId>
27-
<version>2.5.5-SNAPSHOT</version>
27+
<version>3.0.0-SNAPSHOT</version>
2828
<relativePath>../pom.xml</relativePath>
2929
</parent>
3030
<groupId>org.apache.opennlp</groupId>

opennlp-docs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.opennlp</groupId>
2626
<artifactId>opennlp</artifactId>
27-
<version>2.5.5-SNAPSHOT</version>
27+
<version>3.0.0-SNAPSHOT</version>
2828
<relativePath>../pom.xml</relativePath>
2929
</parent>
3030

opennlp-docs/src/docbkx/model-loading.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,18 @@ under the License.
7878

7979
<programlisting language="java">
8080
<![CDATA[
81-
final ClassgraphModelFinder finder = new ClassgraphModelFinder(); // or use new SimpleClassPathModelFinder()
81+
final ClassgraphModelFinder finder = new ClassgraphModelFinder(); // or use: new SimpleClassPathModelFinder()
8282
final ClassPathModelLoader loader = new ClassPathModelLoader();
8383
final Set<ClassPathModelEntry> models = finder.findModels(false);
8484
for(ClassPathModelEntry entry : models) {
8585
8686
final ClassPathModel model = loader.load(entry);
8787
8888
if(model != null) {
89-
System.out.println(model.getModelName());
90-
System.out.println(model.getModelSHA256());
91-
System.out.println(model.getModelVersion());
92-
System.out.println(model.getModeLanguage());
89+
System.out.println(model.getModelName());
90+
System.out.println(model.getModelSHA256());
91+
System.out.println(model.getModelVersion());
92+
System.out.println(model.getModelLanguage());
9393
// do something with the model by consuming the byte array
9494
}
9595
}]]>
@@ -120,23 +120,23 @@ model.language=${model.language}
120120
Make sure to replace the values accordingly and configure your build tool to include the binary model and the <emphasis>model.properties</emphasis>
121121
in the resulting JAR file.
122122

123-
To load such a custom model, you may need to adjust the pattern for classpath scanning. For example, if you name your model "custom-opennlp-model",
123+
To load such a custom model, you may need to adjust the pattern for classpath scanning. For example, if you name the model "custom-opennlp-model",
124124
you need the following code to successfully find and load it:
125125

126126
<programlisting language="java">
127127
<![CDATA[
128-
final ClassgraphModelFinder finder = new ClassgraphModelFinder("custom-opennlp-model.jar"); // or use new SimpleClassPathModelFinder("custom-opennlp-model.jar")
128+
final ClassgraphModelFinder finder = new ClassgraphModelFinder("custom-opennlp-model.jar"); // or use: new SimpleClassPathModelFinder("custom-opennlp-model.jar")
129129
final ClassPathModelLoader loader = new ClassPathModelLoader();
130130
final Set<ClassPathModelEntry> models = finder.findModels(false);
131131
for(ClassPathModelEntry entry : models) {
132132
133133
final ClassPathModel model = loader.load(entry);
134134
135135
if(model != null) {
136-
System.out.println(model.getModelName());
137-
System.out.println(model.getModelSHA256());
138-
System.out.println(model.getModelVersion());
139-
System.out.println(model.getModeLanguage());
136+
System.out.println(model.getModelName());
137+
System.out.println(model.getModelSHA256());
138+
System.out.println(model.getModelVersion());
139+
System.out.println(model.getModelLanguage());
140140
// do something with the model by consuming the byte array
141141
}
142142
}]]>

opennlp-morfologik-addon/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.opennlp</groupId>
2626
<artifactId>opennlp</artifactId>
27-
<version>2.5.5-SNAPSHOT</version>
27+
<version>3.0.0-SNAPSHOT</version>
2828
<relativePath>../pom.xml</relativePath>
2929
</parent>
3030

0 commit comments

Comments
 (0)