public static class SimpleStatisticalSpellingCorrector.Learner extends AbstractBatchAndIncrementalLearner<java.lang.String,SimpleStatisticalSpellingCorrector>
SimpleStatisticalSpellingCorrector.| Modifier and Type | Field and Description |
|---|---|
protected char[] |
alphabet
The alphabet of lower case characters.
|
| Constructor and Description |
|---|
Learner()
Creates a new simple statistical spelling corrector learner with the
default alphabet.
|
Learner(char[] alphabet)
Creates a new simple statistical spelling corrector learner with the
default alphabet.
|
| Modifier and Type | Method and Description |
|---|---|
SimpleStatisticalSpellingCorrector |
createInitialLearnedObject()
Creates a new initial learned object, before any data is given.
|
char[] |
getAlphabet()
Gets the alphabet of lower-case characters that can be used for
replaces and inserts.
|
void |
setAlphabet(char[] alphabet)
Sets the alphabet of lower-case characters that can be used for
replaces and inserts.
|
void |
update(SimpleStatisticalSpellingCorrector target,
java.lang.String word)
The
update method updates an object of ResultType using
the given new data of type DataType, using some form of
"learning" algorithm. |
clone, learn, learn, updatepublic Learner()
public Learner(char[] alphabet)
alphabet - The alphabet of lower-case characters to use.public SimpleStatisticalSpellingCorrector createInitialLearnedObject()
IncrementalLearnerpublic void update(SimpleStatisticalSpellingCorrector target, java.lang.String word)
IncrementalLearnerupdate method updates an object of ResultType using
the given new data of type DataType, using some form of
"learning" algorithm.target - The object to update.word - The new data for the learning algorithm to use to update
the object.public char[] getAlphabet()
public void setAlphabet(char[] alphabet)
alphabet - The alphabet of lower-case characters.