public abstract class AbstractStopwords extends java.lang.Object implements OptionHandler, StopwordsHandler, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
m_Debug
debugging flag.
|
protected boolean |
m_Initialized
whether the scheme has been initialized.
|
| Constructor and Description |
|---|
AbstractStopwords() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
debug(java.lang.String msg)
Outputs the debug message, prefixed with classname.
|
java.lang.String |
debugTipText()
Returns the tip text for this property
|
protected void |
error(java.lang.String msg)
Outputs the error message, prefixed with classname.
|
boolean |
getDebug()
Get whether debugging is turned on.
|
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
abstract java.lang.String |
globalInfo()
Returns a string describing the stopwords scheme.
|
protected void |
initialize()
Performs intialization of the scheme.
|
protected abstract boolean |
is(java.lang.String word)
Returns true if the given string is a stop word.
|
boolean |
isStopword(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.
|
protected void |
reset()
Resets the scheme and the initialized state.
|
void |
setDebug(boolean debug)
Set debugging mode.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
protected boolean m_Initialized
protected boolean m_Debug
public abstract java.lang.String globalInfo()
protected void reset()
public java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
setOptions in interface OptionHandleroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic void setDebug(boolean debug)
debug - true if debug output should be printedpublic boolean getDebug()
public java.lang.String debugTipText()
protected void error(java.lang.String msg)
msg - the message to outputprotected void debug(java.lang.String msg)
msg - the message to outputprotected void initialize()
protected abstract boolean is(java.lang.String word)
word - the word to testpublic boolean isStopword(java.lang.String word)
isStopword in interface StopwordsHandlerword - the word to test