|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.terms.Stopwords
public class Stopwords
Implements stopword removal, as a TermPipeline object. Stopword list to load can be
passed in the constructor or loaded from the stopwords.filename property.
Note that this TermPipeline uses the system default encoding for the stopword list.
Properties
Constructor Summary | |
---|---|
Stopwords(TermPipeline next)
Makes a new stopword termpipeline object. |
|
Stopwords(TermPipeline next,
java.lang.String StopwordsFile)
Makes a new stopword term pipeline object. |
|
Stopwords(TermPipeline next,
java.lang.String[] StopwordsFiles)
Makes a new stopword term pipeline object. |
Method Summary | |
---|---|
void |
clear()
Clear all stopwords from this stopword list object. |
boolean |
isStopword(java.lang.String t)
Returns true is term t is a stopword |
void |
loadStopwordsList(java.lang.String stopwordsFilename)
Loads the specified stopwords file. |
void |
loadStopwordsList(java.lang.String[] StopwordsFiles)
Loads the specified stopwords files. |
void |
processTerm(java.lang.String t)
Checks to see if term t is a stopword. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Stopwords(TermPipeline next)
next
- TermPipeline the next component in the term pipeline.public Stopwords(TermPipeline next, java.lang.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, java.lang.String[] StopwordsFiles)
next
- TermPipeline the next component in the term pipelineStopwordsFiles
- Array of filenames of stopword lists.Method Detail |
---|
public void loadStopwordsList(java.lang.String[] StopwordsFiles)
StopwordsFiles
- Array of filenames of stopword lists.public void loadStopwordsList(java.lang.String stopwordsFilename)
stopwordsFilename
- The filename of the file to use as the stopwords list.public void clear()
public boolean isStopword(java.lang.String t)
public void processTerm(java.lang.String t)
processTerm
in interface TermPipeline
t
- The term to be checked.
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |