public class DoubleMeta extends java.lang.Object implements Transformator
Things that were changed:
The alternate flag could be set to true but was never checked so why bother with it. REMOVED
Why was this class serializable?
The primary, in, length and last variables could be initialized and local to the
process method and references passed around the appropriate methods. As such there are
no class variables and this class becomes firstly threadsafe and secondly could be static final.
The function call SlavoGermaic was called repeatedly in the process function, it is now only called once.
Constructor and Description |
---|
DoubleMeta() |
Modifier and Type | Method and Description |
---|---|
char[] |
getReplaceList()
gets the list of characters that should be swapped in to the misspelled word
in order to try to find more suggestions.
|
java.lang.String |
transform(java.lang.String word)
Take the given word, and return the best phonetic hash for it.
|
public final java.lang.String transform(java.lang.String word)
transform
in interface Transformator
word
- the texte to transformpublic char[] getReplaceList()
Transformator
getReplaceList
in interface Transformator
Transformator.getReplaceList()