|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.utils.IsCloseableObject
edu.northwestern.at.utils.corpuslinguistics.spellingstandardizer.AbstractSpellingStandardizer
edu.northwestern.at.utils.corpuslinguistics.spellingstandardizer.SimpleSpellingStandardizer
edu.northwestern.at.utils.corpuslinguistics.spellingstandardizer.ExtendedSimpleSpellingStandardizer
edu.northwestern.at.utils.corpuslinguistics.spellingstandardizer.ExtendedSearchSpellingStandardizer
public class ExtendedSearchSpellingStandardizer
ExtendedSearchSpellingStandardizer: extended search spelling standardizer.
ExtendedSearchSpellingStandardizer uses spelling correction methods to try to find a good list of suggested standardized spellings.
| Field Summary | |
|---|---|
protected DoubleMetaphone |
doubleMetaphone
Double metaphone encoder. |
protected SpellingChecker |
spellingChecker
Spelling checker. |
| Fields inherited from class edu.northwestern.at.utils.corpuslinguistics.spellingstandardizer.ExtendedSimpleSpellingStandardizer |
|---|
gapFiller |
| Fields inherited from class edu.northwestern.at.utils.corpuslinguistics.spellingstandardizer.AbstractSpellingStandardizer |
|---|
alternateSpellingsWordClasses, defaultSpellingsByWordClassFileName, lexicon, logger, mappedSpellings, spellingsByWordClass, standardSpellingSet |
| Constructor Summary | |
|---|---|
ExtendedSearchSpellingStandardizer()
Create extended search spelling standardizer. |
|
| Method Summary | |
|---|---|
java.lang.String[] |
applyHeuristics(java.lang.String spelling)
Apply heuristics to spellings to see if we can find a match.. |
void |
createDictionaries()
Creates dictionaries from spelling lists. |
java.lang.String |
getBestSuggestedSpelling(java.lang.String spelling)
Get best suggested spelling. |
java.util.List<ScoredString> |
getScoredSuggestedSpellings(java.lang.String spelling)
Return suggested spellings. |
java.lang.String[] |
getSuggestedSpellings(java.lang.String spelling)
Return suggested spellings. |
void |
loadAlternativeSpellings(java.io.Reader reader,
java.lang.String delimChars)
Loads alternative spellings from a reader. |
void |
loadStandardSpellings(java.io.Reader reader)
Loads standard spellings from a reader. |
java.lang.String |
longSVariant(java.lang.String spelling)
Apply "long s" heuristics to a spelling. |
java.lang.String |
preprocessSpelling(java.lang.String spelling)
Preprocess spelling. |
java.lang.String |
simpleReplacement(java.lang.String spelling,
java.lang.String pattern,
java.lang.String replacement)
Apply simple string replacement. |
java.lang.String[] |
standardizeSpelling(java.lang.String spelling)
Returns standard spellings given a spelling. |
java.lang.String |
toString()
Return standardizer description. |
| Methods inherited from class edu.northwestern.at.utils.corpuslinguistics.spellingstandardizer.ExtendedSimpleSpellingStandardizer |
|---|
doStandardizeSpelling, fixGaps |
| Methods inherited from class edu.northwestern.at.utils.corpuslinguistics.spellingstandardizer.AbstractSpellingStandardizer |
|---|
addCachedSpelling, addMappedSpelling, addStandardSpelling, addStandardSpellings, fixCapitalization, getLexicon, getLogger, getMappedSpellings, getNumberOfAlternateSpellings, getNumberOfAlternateSpellingsByWordClass, getNumberOfStandardSpellings, getStandardSpellings, loadAlternativeSpellings, loadAlternativeSpellingsByWordClass, loadStandardSpellings, setLexicon, setLogger, setMappedSpellings, setStandardSpellings, standardizeSpelling |
| Methods inherited from class edu.northwestern.at.utils.IsCloseableObject |
|---|
close |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.northwestern.at.utils.corpuslinguistics.spellingstandardizer.SpellingStandardizer |
|---|
addMappedSpelling, addStandardSpelling, addStandardSpellings, fixCapitalization, getMappedSpellings, getNumberOfAlternateSpellings, getNumberOfAlternateSpellingsByWordClass, getNumberOfStandardSpellings, getStandardSpellings, loadAlternativeSpellings, loadAlternativeSpellingsByWordClass, loadStandardSpellings, setMappedSpellings, setStandardSpellings, standardizeSpelling |
| Field Detail |
|---|
protected SpellingChecker spellingChecker
protected DoubleMetaphone doubleMetaphone
| Constructor Detail |
|---|
public ExtendedSearchSpellingStandardizer()
| Method Detail |
|---|
public void createDictionaries()
public void loadAlternativeSpellings(java.io.Reader reader,
java.lang.String delimChars)
throws java.io.IOException
loadAlternativeSpellings in interface SpellingStandardizerloadAlternativeSpellings in class AbstractSpellingStandardizerreader - The reader.delimChars - Delimiter characters separating spelling pairs.
java.io.IOException
public void loadStandardSpellings(java.io.Reader reader)
throws java.io.IOException
loadStandardSpellings in interface SpellingStandardizerloadStandardSpellings in class AbstractSpellingStandardizerreader - The reader.
java.io.IOExceptionpublic java.lang.String[] applyHeuristics(java.lang.String spelling)
spelling - Spelling to which to apply heuristics.
public java.lang.String simpleReplacement(java.lang.String spelling,
java.lang.String pattern,
java.lang.String replacement)
spelling - The spelling.pattern - String of characters to look for in spelling.replacement - Replacement characters.
public java.lang.String longSVariant(java.lang.String spelling)
spelling - Spelling suggestion to which to apply heuristics.
public java.lang.String preprocessSpelling(java.lang.String spelling)
preprocessSpelling in interface SpellingStandardizerpreprocessSpelling in class ExtendedSimpleSpellingStandardizerspelling - Spelling to preprocess.
public java.lang.String[] standardizeSpelling(java.lang.String spelling)
standardizeSpelling in interface SpellingStandardizerstandardizeSpelling in class ExtendedSimpleSpellingStandardizerspelling - The spelling.
public java.lang.String getBestSuggestedSpelling(java.lang.String spelling)
spelling - The spelling for which to return suggestion.
public java.util.List<ScoredString> getScoredSuggestedSpellings(java.lang.String spelling)
spelling - The spelling for which to return suggestions.
public java.lang.String[] getSuggestedSpellings(java.lang.String spelling)
spelling - The spelling for which to return suggestions.
public java.lang.String toString()
toString in class ExtendedSimpleSpellingStandardizer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||