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
public abstract class AbstractFileBasedStopwords extends AbstractStopwords
Ancestor for file-based stopword schemes.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractFileBasedStopwords()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String[]getOptions()Gets the current settings of the Classifier.FilegetStopwords()returns the file used for obtaining the stopwords, if the file represents a directory then the default ones are used.Enumeration<Option>listOptions()Returns an enumeration describing the available options.voidsetOptions(String[] options)Parses a given list of options.voidsetStopwords(File value)Sets the file containing the stopwords, null or a directory unset the stopwords.abstract StringstopwordsTipText()Returns the tip text for this property.-
Methods inherited from class weka.core.stopwords.AbstractStopwords
debugTipText, getDebug, globalInfo, isStopword, setDebug
-
-
-
-
Method Detail
-
listOptions
public Enumeration<Option> listOptions()
Returns an enumeration describing the available options.- Specified by:
listOptionsin interfaceOptionHandler- Overrides:
listOptionsin classAbstractStopwords- Returns:
- an enumeration of all the available options.
-
setOptions
public void setOptions(String[] options) throws Exception
Parses a given list of options.- Specified by:
setOptionsin interfaceOptionHandler- Overrides:
setOptionsin classAbstractStopwords- Parameters:
options- the list of options as an array of strings- Throws:
Exception- if an option is not supported
-
getOptions
public String[] getOptions()
Gets the current settings of the Classifier.- Specified by:
getOptionsin interfaceOptionHandler- Overrides:
getOptionsin classAbstractStopwords- Returns:
- an array of strings suitable for passing to setOptions
-
setStopwords
public void setStopwords(File value)
Sets the file containing the stopwords, null or a directory unset the stopwords.- Parameters:
value- the file containing the stopwords
-
getStopwords
public File 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
public abstract String stopwordsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
-