Package weka.core.stopwords
Class AbstractStopwords
java.lang.Object
weka.core.stopwords.AbstractStopwords
- All Implemented Interfaces:
Serializable
,OptionHandler
,StopwordsHandler
- Direct Known Subclasses:
AbstractFileBasedStopwords
,MultiStopwords
,Null
,Rainbow
public abstract class AbstractStopwords
extends Object
implements OptionHandler, StopwordsHandler, Serializable
Ancestor for stopwords classes.
- Version:
- $Revision: 10978 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the tip text for this propertyboolean
getDebug()
Get whether debugging is turned on.String[]
Gets the current settings of the Classifier.abstract String
Returns a string describing the stopwords scheme.boolean
isStopword
(String word) Returns true if the given string is a stop word.Returns an enumeration describing the available options.void
setDebug
(boolean debug) Set debugging mode.void
setOptions
(String[] options) Parses a given list of options.
-
Constructor Details
-
AbstractStopwords
public AbstractStopwords()
-
-
Method Details
-
globalInfo
Returns a string describing the stopwords scheme.- Returns:
- a description suitable for displaying in the gui
-
listOptions
Returns an enumeration describing the available options.- Specified by:
listOptions
in interfaceOptionHandler
- Returns:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options.- Specified by:
setOptions
in interfaceOptionHandler
- 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
- 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
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
isStopword
Returns true if the given string is a stop word.- Specified by:
isStopword
in interfaceStopwordsHandler
- Parameters:
word
- the word to test- Returns:
- true if the word is a stopword
-