Package weka.core.tokenizers.cleaners
Class MultiCleaner
- java.lang.Object
-
- weka.core.tokenizers.cleaners.AbstractTokenCleaner
-
- weka.core.tokenizers.cleaners.MultiCleaner
-
- All Implemented Interfaces:
Serializable,weka.core.OptionHandler,TokenCleaner
public class MultiCleaner extends AbstractTokenCleaner
Combines multiple cleaners, applies them sequentially.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLEANERprotected TokenCleaner[]m_Cleanersthe cleaners to use.
-
Constructor Summary
Constructors Constructor Description MultiCleaner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringclean(String token)Determines whether a token is clean or not.StringcleanersTipText()Returns the tip text for this property.TokenCleaner[]getCleaners()Returns the cleaners to use.protected TokenCleaner[]getDefaultCleaners()Returns the default token cleaners.String[]getOptions()Gets the current option settings for the OptionHandler.StringglobalInfo()Returns a string describing the cleaner.EnumerationlistOptions()Returns an enumeration describing the available options.voidsetCleaners(TokenCleaner[] value)Sets the cleaners to use.voidsetOptions(String[] options)Sets the OptionHandler's options using the given list.-
Methods inherited from class weka.core.tokenizers.cleaners.AbstractTokenCleaner
reset
-
-
-
-
Field Detail
-
CLEANER
public static final String CLEANER
- See Also:
- Constant Field Values
-
m_Cleaners
protected TokenCleaner[] m_Cleaners
the cleaners to use.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the cleaner.- Specified by:
globalInfoin classAbstractTokenCleaner- Returns:
- a description suitable for displaying in the explorer/experimenter gui
-
listOptions
public Enumeration listOptions()
Returns an enumeration describing the available options.- Specified by:
listOptionsin interfaceweka.core.OptionHandler- Overrides:
listOptionsin classAbstractTokenCleaner- Returns:
- an enumeration of all the available options.
-
setOptions
public void setOptions(String[] options) throws Exception
Sets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible).- Specified by:
setOptionsin interfaceweka.core.OptionHandler- Overrides:
setOptionsin classAbstractTokenCleaner- 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 option settings for the OptionHandler.- Specified by:
getOptionsin interfaceweka.core.OptionHandler- Overrides:
getOptionsin classAbstractTokenCleaner- Returns:
- the list of current option settings as an array of strings
-
getDefaultCleaners
protected TokenCleaner[] getDefaultCleaners()
Returns the default token cleaners.- Returns:
- the default
-
setCleaners
public void setCleaners(TokenCleaner[] value)
Sets the cleaners to use.- Parameters:
value- the cleaners
-
getCleaners
public TokenCleaner[] getCleaners()
Returns the cleaners to use.- Returns:
- the cleaners
-
cleanersTipText
public String cleanersTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
clean
public String clean(String token)
Determines whether a token is clean or not.- Specified by:
cleanin interfaceTokenCleaner- Specified by:
cleanin classAbstractTokenCleaner- Parameters:
token- the token to check- Returns:
- the clean token or null to ignore
-
-