public class AdornedWordStopWordFilter extends java.lang.Object implements AdornedWordFilter
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.String> |
stopWordsSet
Stop words.
|
Constructor and Description |
---|
AdornedWordStopWordFilter()
Create the stop word filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(AdornedWord adornedWord)
Tests if a specified adorned word should be included.
|
void |
addStopWord(java.lang.String stopWord)
Add word to stop word list.
|
void |
addStopWords(java.util.Collection<java.lang.String> stopWords)
Add words to stop word list.
|
public AdornedWordStopWordFilter()
public void addStopWord(java.lang.String stopWord)
stopWord
- Stop word to add.public void addStopWords(java.util.Collection<java.lang.String> stopWords)
stopWords
- Collection of stop words to add.public boolean accept(AdornedWord adornedWord)
accept
in interface AdornedWordFilter
adornedWord
- The adorned word to check.