OpenNLP is a popular NLP library that supports the SBD process among other NLP tasks. As we will see, it is easy to use. We will use the SentenceDetectorME class to demonstrate this process. This is a maximum entropy model that is based on a statistical classification approach.
Using OpenNLP to perform SBD
Getting ready
To prepare, we need to do the following:
- Create a new Maven project.
- Add the following POM dependency to your project:
<dependency>
<groupId>org.apache.opennlp</groupId>
<artifactId>opennlp-tools</artifactId>
<version>1.9.0</version>
</dependency>
- Download the en-sent.bin file from http://opennlp.sourceforge.net/models-1.5/. Save the file in your project...