public abstract class AbstractTextSegmenter extends IsCloseableObject implements TextSegmenter, IsCloseable, UsesLogger
Modifier and Type | Field and Description |
---|---|
protected Logger |
logger
Logger used for output.
|
protected Stemmer |
stemmer
Stemmer.
|
protected StopWords |
stopWords
Stop words.
|
Constructor and Description |
---|
AbstractTextSegmenter()
Create a text segmenter.
|
Modifier and Type | Method and Description |
---|---|
Logger |
getLogger()
Get the logger.
|
abstract <T> java.util.List<java.lang.Integer> |
getSegmentPositions(java.util.List<java.util.List<T>> sentences)
Segment text.
|
Stemmer |
getStemmer()
Get the stemmer.
|
StopWords |
getStopWords()
Get the stop words.
|
void |
setLogger(Logger logger)
Set the logger.
|
void |
setStemmer(Stemmer stemmer)
Set stop word set.
|
void |
setStopWords(StopWords stopWords)
Set stop word set.
|
close
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
protected Logger logger
protected StopWords stopWords
protected Stemmer stemmer
public Logger getLogger()
getLogger
in interface UsesLogger
public void setLogger(Logger logger)
setLogger
in interface UsesLogger
logger
- The logger.public StopWords getStopWords()
public void setStopWords(StopWords stopWords)
stopWords
- The stop words.public Stemmer getStemmer()
public void setStemmer(Stemmer stemmer)
stemmer
- The stemmer.public abstract <T> java.util.List<java.lang.Integer> getSegmentPositions(java.util.List<java.util.List<T>> sentences)
getSegmentPositions
in interface TextSegmenter
sentences
- The list of tokenized sentences to segment.