Package weka.core.stopwords
Class AbstractStopwords
- java.lang.Object
-
- weka.core.stopwords.AbstractStopwords
-
- All Implemented Interfaces:
java.io.Serializable,OptionHandler,StopwordsHandler
- Direct Known Subclasses:
AbstractFileBasedStopwords,MultiStopwords,Null,Rainbow
public abstract class AbstractStopwords extends java.lang.Object implements OptionHandler, StopwordsHandler, java.io.Serializable
Ancestor for stopwords classes.- Version:
- $Revision: 10978 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractStopwords()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringdebugTipText()Returns the tip text for this propertybooleangetDebug()Get whether debugging is turned on.java.lang.String[]getOptions()Gets the current settings of the Classifier.abstract java.lang.StringglobalInfo()Returns a string describing the stopwords scheme.booleanisStopword(java.lang.String word)Returns true if the given string is a stop word.java.util.Enumeration<Option>listOptions()Returns an enumeration describing the available options.voidsetDebug(boolean debug)Set debugging mode.voidsetOptions(java.lang.String[] options)Parses a given list of options.
-
-
-
Method Detail
-
globalInfo
public abstract java.lang.String globalInfo()
Returns a string describing the stopwords scheme.- Returns:
- a description suitable for displaying in the gui
-
listOptions
public java.util.Enumeration<Option> listOptions()
Returns an enumeration describing the available options.- Specified by:
listOptionsin interfaceOptionHandler- Returns:
- an enumeration of all the available options.
-
setOptions
public void setOptions(java.lang.String[] options) throws java.lang.ExceptionParses a given list of options.- Specified by:
setOptionsin interfaceOptionHandler- Parameters:
options- the list of options as an array of strings- Throws:
java.lang.Exception- if an option is not supported
-
getOptions
public java.lang.String[] getOptions()
Gets the current settings of the Classifier.- Specified by:
getOptionsin interfaceOptionHandler- Returns:
- an array of strings suitable for passing to setOptions
-
setDebug
public void setDebug(boolean debug)
Set debugging mode.- Parameters:
debug- true if debug output should be printed
-
getDebug
public boolean getDebug()
Get whether debugging is turned on.- Returns:
- true if debugging output is on
-
debugTipText
public java.lang.String debugTipText()
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
isStopword
public boolean isStopword(java.lang.String word)
Returns true if the given string is a stop word.- Specified by:
isStopwordin interfaceStopwordsHandler- Parameters:
word- the word to test- Returns:
- true if the word is a stopword
-
-