public abstract class Tokenizer extends Object implements Enumeration<String>, OptionHandler, Serializable, RevisionHandler
Constructor and Description |
---|
Tokenizer() |
Modifier and Type | Method and Description |
---|---|
String[] |
getOptions()
Gets the current option settings for the OptionHandler.
|
abstract String |
globalInfo()
Returns a string describing the stemmer
|
abstract boolean |
hasMoreElements()
Tests if this enumeration contains more elements.
|
Enumeration<Option> |
listOptions()
Returns an enumeration of all the available options..
|
abstract String |
nextElement()
Returns the next element of this enumeration if this enumeration object has
at least one more element to provide.
|
static void |
runTokenizer(Tokenizer tokenizer,
String[] options)
initializes the given tokenizer with the given options and runs the
tokenizer over all the remaining strings in the options array.
|
void |
setOptions(String[] options)
Sets the OptionHandler's options using the given list.
|
abstract void |
tokenize(String s)
Sets the string to tokenize.
|
static String[] |
tokenize(Tokenizer tokenizer,
String[] options)
initializes the given tokenizer with the given options and runs the
tokenizer over all the remaining strings in the options array.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRevision
public abstract String globalInfo()
public Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
public String[] getOptions()
getOptions
in interface OptionHandler
public void setOptions(String[] options) throws Exception
setOptions
in interface OptionHandler
options
- the list of options as an array of stringsException
- if an option is not supportedpublic abstract boolean hasMoreElements()
hasMoreElements
in interface Enumeration<String>
public abstract String nextElement()
nextElement
in interface Enumeration<String>
public abstract void tokenize(String s)
s
- the string to tokenizepublic static String[] tokenize(Tokenizer tokenizer, String[] options) throws Exception
tokenizer
- the tokenizer to useoptions
- the options for the tokenizerException
- if setting of options or tokenization failspublic static void runTokenizer(Tokenizer tokenizer, String[] options)
tokenizer
- the tokenizer to useoptions
- the options for the tokenizerCopyright © 2018 University of Waikato, Hamilton, NZ. All Rights Reserved.