Package weka.core.stopwords
Class AbstractFileBasedStopwords
java.lang.Object
weka.core.stopwords.AbstractStopwords
weka.core.stopwords.AbstractFileBasedStopwords
- All Implemented Interfaces:
Serializable
,OptionHandler
,StopwordsHandler
- Direct Known Subclasses:
RegExpFromFile
,WordsFromFile
Ancestor for file-based stopword schemes.
- Version:
- $Revision: 10982 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Gets the current settings of the Classifier.returns the file used for obtaining the stopwords, if the file represents a directory then the default ones are used.Returns an enumeration describing the available options.void
setOptions
(String[] options) Parses a given list of options.void
setStopwords
(File value) Sets the file containing the stopwords, null or a directory unset the stopwords.abstract String
Returns the tip text for this property.Methods inherited from class weka.core.stopwords.AbstractStopwords
debugTipText, getDebug, globalInfo, isStopword, setDebug
-
Constructor Details
-
AbstractFileBasedStopwords
public AbstractFileBasedStopwords()
-
-
Method Details
-
listOptions
Returns an enumeration describing the available options.- Specified by:
listOptions
in interfaceOptionHandler
- Overrides:
listOptions
in classAbstractStopwords
- Returns:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options.- Specified by:
setOptions
in interfaceOptionHandler
- Overrides:
setOptions
in classAbstractStopwords
- Parameters:
options
- the list of options as an array of strings- Throws:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the Classifier.- Specified by:
getOptions
in interfaceOptionHandler
- Overrides:
getOptions
in classAbstractStopwords
- Returns:
- an array of strings suitable for passing to setOptions
-
setStopwords
Sets the file containing the stopwords, null or a directory unset the stopwords.- Parameters:
value
- the file containing the stopwords
-
getStopwords
returns the file used for obtaining the stopwords, if the file represents a directory then the default ones are used.- Returns:
- the file containing the stopwords
-
stopwordsTipText
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-