Package net.ontopia.topicmaps.classify
Class StopList
- java.lang.Object
-
- net.ontopia.topicmaps.classify.StopList
-
- All Implemented Interfaces:
TermAnalyzerIF
public class StopList extends Object implements TermAnalyzerIF
INTERNAL: A set of words considered "stop words" in a particular language.
-
-
Field Summary
Fields Modifier and Type Field Description protected double
stopFactor
protected Collection<String>
stopList
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
analyzeTerm(Term term)
void
endAnalysis()
boolean
isStopWord(String word)
void
setStopFactor(double stopFactor)
void
startAnalysis(TermDatabase tdb)
-
-
-
Field Detail
-
stopList
protected Collection<String> stopList
-
stopFactor
protected double stopFactor
-
-
Constructor Detail
-
StopList
public StopList(String filename)
INTERNAL: Loads the stop list as a resource. The format of the stop list is a plain text file with one word per line.
-
StopList
public StopList(File file)
INTERNAL: Loads the stop list from a file. The format of the stop list is a plain text file with one word per line.
-
-
Method Detail
-
setStopFactor
public void setStopFactor(double stopFactor)
-
isStopWord
public boolean isStopWord(String word)
-
analyzeTerm
public void analyzeTerm(Term term)
- Specified by:
analyzeTerm
in interfaceTermAnalyzerIF
-
startAnalysis
public void startAnalysis(TermDatabase tdb)
- Specified by:
startAnalysis
in interfaceTermAnalyzerIF
-
endAnalysis
public void endAnalysis()
- Specified by:
endAnalysis
in interfaceTermAnalyzerIF
-
-