You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more details please check our [documentation](http://opennlp.apache.org/docs/)
106
106
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
+
107
129
## Building OpenNLP
108
130
109
131
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:
114
136
mvn install
115
137
```
116
138
117
-
### Additional Developement Information
139
+
### Additional Development Information
118
140
119
-
-[Building and Integrating Snowball Stemmer for OpenNLP](dev/Snowball-Stemmer.md)
141
+
- Building and integrating [Snowball Stemmer](dev/Snowball-Stemmer.md) for OpenNLP.
120
142
121
143
## Contributing
122
144
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.
124
148
125
149
If you would like to get involved please follow the instructions [here](https://github.com/apache/opennlp/blob/main/.github/CONTRIBUTING.md)
Make sure to replace the values accordingly and configure your build tool to include the binary model and the <emphasis>model.properties</emphasis>
121
121
in the resulting JAR file.
122
122
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",
124
124
you need the following code to successfully find and load it:
125
125
126
126
<programlistinglanguage="java">
127
127
<![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")
129
129
final ClassPathModelLoader loader = new ClassPathModelLoader();
130
130
final Set<ClassPathModelEntry> models = finder.findModels(false);
131
131
for(ClassPathModelEntry entry : models) {
132
132
133
133
final ClassPathModel model = loader.load(entry);
134
134
135
135
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());
140
140
// do something with the model by consuming the byte array
0 commit comments