public class DecruftifyingSpellingStandardizer extends AbstractSpellingStandardizer implements SpellingStandardizer
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
cache
Cache for decruftified entries.
|
alternateSpellingsWordClasses, defaultSpellingsByWordClassFileName, lexicon, logger, mappedSpellings, spellingsByWordClass, standardSpellingSet
Constructor and Description |
---|
DecruftifyingSpellingStandardizer()
Create decruftifying spelling standardizer.
|
Modifier and Type | Method and Description |
---|---|
void |
loadAlternativeSpellings(java.io.Reader reader,
java.lang.String delimChars)
Loads alternative spellings from a reader.
|
java.lang.String[] |
standardizeSpelling(java.lang.String spelling)
Returns standard spellings given a spelling.
|
java.lang.String |
standardizeSpelling(java.lang.String spelling,
java.lang.String wordClass)
Returns a standard spelling given a standard or alternate spelling.
|
java.lang.String |
toString()
Return standardizer description.
|
addCachedSpelling, addMappedSpelling, addStandardSpelling, addStandardSpellings, fixCapitalization, getLexicon, getLogger, getMappedSpellings, getNumberOfAlternateSpellings, getNumberOfAlternateSpellingsByWordClass, getNumberOfStandardSpellings, getStandardSpellings, loadAlternativeSpellings, loadAlternativeSpellings, loadAlternativeSpellingsByWordClass, loadStandardSpellings, loadStandardSpellings, loadStandardSpellings, preprocessSpelling, setLexicon, setLogger, setMappedSpellings, setStandardSpellings
close
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addMappedSpelling, addStandardSpelling, addStandardSpellings, fixCapitalization, getMappedSpellings, getNumberOfAlternateSpellings, getNumberOfAlternateSpellingsByWordClass, getNumberOfStandardSpellings, getStandardSpellings, loadAlternativeSpellings, loadAlternativeSpellings, loadAlternativeSpellingsByWordClass, loadStandardSpellings, loadStandardSpellings, loadStandardSpellings, preprocessSpelling, setMappedSpellings, setStandardSpellings
protected java.util.Map<java.lang.String,java.lang.String> cache
public DecruftifyingSpellingStandardizer()
public void loadAlternativeSpellings(java.io.Reader reader, java.lang.String delimChars) throws java.io.IOException
loadAlternativeSpellings
in interface SpellingStandardizer
loadAlternativeSpellings
in class AbstractSpellingStandardizer
reader
- The reader.delimChars
- Delimiter characters separating spelling pairs.
Unused in this standardizer.
java.io.IOException
public java.lang.String[] standardizeSpelling(java.lang.String spelling)
standardizeSpelling
in interface SpellingStandardizer
standardizeSpelling
in class AbstractSpellingStandardizer
spelling
- The spelling.public java.lang.String standardizeSpelling(java.lang.String spelling, java.lang.String wordClass)
standardizeSpelling
in interface SpellingStandardizer
standardizeSpelling
in class AbstractSpellingStandardizer
spelling
- The spelling.wordClass
- The word class.public java.lang.String toString()
toString
in class java.lang.Object