public class Stopwords extends Object implements TermPipeline
Modifier and Type | Field and Description |
---|---|
protected static boolean |
INTERN_STOPWORDS |
protected TermPipeline |
next
The next component in the term pipeline.
|
protected gnu.trove.THashSet<String> |
stopWords
The hashset that contains all the stop words.
|
Constructor and Description |
---|
Stopwords(TermPipeline _next)
Makes a new stopword termpipeline object.
|
Stopwords(TermPipeline _next,
String StopwordsFile)
Makes a new stopword term pipeline object.
|
Stopwords(TermPipeline _next,
String[] StopwordsFiles)
Makes a new stopword term pipeline object.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all stopwords from this stopword list object.
|
boolean |
isStopword(String t)
Returns true is term t is a stopword
|
void |
loadStopwordsList(String stopwordsFilename)
Loads the specified stopwords file.
|
void |
loadStopwordsList(String[] StopwordsFiles)
Loads the specified stopwords files.
|
void |
processTerm(String t)
Checks to see if term t is a stopword.
|
boolean |
reset()
This method implements the specific rest option needed to implements
query or doc oriented policy.
|
protected static final boolean INTERN_STOPWORDS
protected final TermPipeline next
protected final gnu.trove.THashSet<String> stopWords
public Stopwords(TermPipeline _next)
_next
- TermPipeline the next component in the term pipeline.public Stopwords(TermPipeline _next, String StopwordsFile)
_next
- TermPipeline the next component in the term pipelineStopwordsFile
- The filename(s) of the file to use as the stopwords list. Split on comma,
and passed to the (TermPipeline,String[]) constructor.public Stopwords(TermPipeline _next, String[] StopwordsFiles)
_next
- TermPipeline the next component in the term pipelineStopwordsFiles
- Array of filenames of stopword lists.public void loadStopwordsList(String[] StopwordsFiles)
StopwordsFiles
- Array of filenames of stopword lists.public void loadStopwordsList(String stopwordsFilename)
stopwordsFilename
- The filename of the file to use as the stopwords list.public void clear()
public boolean isStopword(String t)
public void processTerm(String t)
processTerm
in interface TermPipeline
t
- The term to be checked.public boolean reset()
reset
in interface TermPipeline
Terrier 4.0. Copyright © 2004-2014 University of Glasgow