Class BreakIteratorSentenceSplitter
java.lang.Object
smile.nlp.tokenizer.BreakIteratorSentenceSplitter
- All Implemented Interfaces:
Function<String,String[]>, SentenceSplitter
A sentence splitter based on the java.text.BreakIterator, which supports
multiple natural languages (selected by locale setting).
Note: BreakIterator is not thread-safe. Each thread
should create its own BreakIteratorSentenceSplitter instance.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the default locale.BreakIteratorSentenceSplitter(Locale locale) Constructor for the given locale. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SentenceSplitter
apply
-
Constructor Details
-
BreakIteratorSentenceSplitter
public BreakIteratorSentenceSplitter()Constructor for the default locale. -
BreakIteratorSentenceSplitter
Constructor for the given locale.- Parameters:
locale- the locale.
-
-
Method Details
-
split
Description copied from interface:SentenceSplitterSplits the text into sentences.- Specified by:
splitin interfaceSentenceSplitter- Parameters:
text- the text.- Returns:
- the sentences.
-