|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.tokenizers.Tokenizer
public abstract class Tokenizer
A superclass for all tokenizer algorithms.
Constructor Summary | |
---|---|
Tokenizer()
|
Method Summary | |
---|---|
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 |
listOptions()
Returns an enumeration of all the available options.. |
abstract Object |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface weka.core.RevisionHandler |
---|
getRevision |
Constructor Detail |
---|
public Tokenizer()
Method Detail |
---|
public abstract String globalInfo()
public Enumeration 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 strings
Exception
- if an option is not supportedpublic abstract boolean hasMoreElements()
hasMoreElements
in interface Enumeration
public abstract Object nextElement()
nextElement
in interface Enumeration
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 tokenizer
Exception
- if setting of options or tokenization failspublic static void runTokenizer(Tokenizer tokenizer, String[] options)
tokenizer
- the tokenizer to useoptions
- the options for the tokenizer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |