Click on the latest version among the available distributions.
Defining the classpath
After downloading the OpenNLP library, you need to define its path to the bin say ctory. Suppose you have downloaded the OpenNLP library to drive E of your system.
Now follow the steps below -
Step 1 - Right click on 'My computer ' and select 'Properties '.
Step 2 - Click on the button 'Environment variables ' under the 'Advanced ' tab.
Step 3 - Select the variable path and click on the button Edit , as shown below screenshot.
Step 4 - In the Edit environment variable window, click on the New button and add the path of the OpenNLP directory E: apache-opennlp -1.6.0 bin and click on the OK button, as shown in the following screenshot.
You can set the eclipse itself for the OpenNLP library, either by setting the build path on the JAR files, or by using pom.
Definition of build path on the JAR Files
Follow the steps below to install OpenNLP in Eclipse -
Step 1 - Make sure the Eclipse environment is installed on your system.
Step 2 - Open Eclipse. Click File → New → Open New Project, as shown below.
Step 3 - You will get the New Project wizard. In this wizard, select the Java project and continue by clicking on the Next button.
Step 4 - Then you getz the New Java Project Wizard . Here you need to create a new project and click on the Next button as shown below.
Step 5 - After creating a new project, right click on it, select Build Path and click on Configure Build Path .
Step 6 - Then you will get the 'wizard Java build path . on the button Add external JAR files , as shown below.
Step 7 - Select the opennlp-tools-1.6.0.jar and opennlp-uima-1.6.0.jar jar files located in the lib folder from apache-opennlp-1.6.0 folder.
By clicking on the button Open in the screen above, the selected files will be added to your library.
Clicking OK will successfully add the required JAR files to the current project and you can check these added libraries by expanding the referenced libraries, as shown below.
Convert project to Maven project and add the following code to its pom.
4.0.0 modelversion> myproject myproject 0.0.1-SNAPSHOT src maven-compiler-plugin 3.5.1 1.8 org.apache.opennlp opennlp-tools 1.6.0 org.apache.opennlp opennlp-uima 1.6.0