public class ConfigurableWordRule
extends WordRule
WordRule
in order to change the list of known words.Constructor and Description |
---|
ConfigurableWordRule(IWordDetector detector)
Creates a rule which, with the help of an word detector, will return the token
associated with the detected word.
|
ConfigurableWordRule(IWordDetector detector,
IToken defaultToken)
Creates a rule which, with the help of a word detector, will return the token
associated with the detected word.
|
Modifier and Type | Method and Description |
---|---|
void |
clearWords()
Clears the lsit of known words.
|
void |
removeWord(java.lang.String word)
Removs the given word from the known list.
|
public ConfigurableWordRule(IWordDetector detector)
detector
- the word detector to be used by this rule, may not be null
#addWord(String, IToken)
public ConfigurableWordRule(IWordDetector detector, IToken defaultToken)
detector
- the word detector to be used by this rule, may not be null
defaultToken
- the default token to be returned on success
if nothing else is specified, may not be null
#addWord(String, IToken)