To prepare, we need to do the following:
- Create a new Maven project.
- Add the following dependency to the project's POM file:
<dependency>
<groupId>org.apache.opennlp</groupId>
<artifactId>opennlp-tools</artifactId>
<version>1.9.0</version>
</dependency>
Download the file, en-pos-maxent.bin, from http://opennlp.sourceforge.net/models-1.5/. Add the file to the root level of your project.