There are several Java core techniques that can be used to perform sentence boundary detection. In this recipe, we will use the BreakIterator class. This class supports the identification of more than just sentences. It can also be used to isolate lines and words.
Performing SBD using the BreakIterator class
Getting ready
Create a new Java project. This does not need to be a Maven project since we will not be using a specialized NLP library.
How to do it...
The necessary steps include the following:
- Add the following import statement to the project:
import java.text...