public interface SpellingStandardizer
| Modifier and Type | Method and Description |
|---|---|
void |
addMappedSpelling(java.lang.String alternateSpelling,
java.lang.String standardSpelling)
Add a mapped spelling.
|
void |
addStandardSpelling(java.lang.String standardSpelling)
Add a standard spelling.
|
void |
addStandardSpellings(java.util.Collection<java.lang.String> standardSpellings)
Add standard spellings from a collection.
|
java.lang.String |
fixCapitalization(java.lang.String spelling,
java.lang.String standardSpelling)
Fix capitalization of standardized spelling.
|
TaggedStrings |
getMappedSpellings()
Return the spelling map.
|
int |
getNumberOfAlternateSpellings()
Returns number of alternate spellings.
|
int[] |
getNumberOfAlternateSpellingsByWordClass()
Returns number of alternate spellings by word class.
|
int |
getNumberOfStandardSpellings()
Returns number of standard spellings.
|
java.util.Set<java.lang.String> |
getStandardSpellings()
Return the standard spellings.
|
void |
loadAlternativeSpellings(java.io.Reader reader,
java.lang.String delimChars)
Loads alternative spellings from a reader.
|
void |
loadAlternativeSpellings(java.net.URL url,
boolean compressed,
java.lang.String encoding,
java.lang.String delimChars)
Loads alternate spellings from a URL.
|
void |
loadAlternativeSpellings(java.net.URL url,
java.lang.String encoding,
java.lang.String delimChars)
Loads alternate spellings from a URL.
|
void |
loadAlternativeSpellingsByWordClass(java.net.URL url,
java.lang.String encoding)
Load alternate to standard spellings by word class.
|
void |
loadStandardSpellings(java.io.Reader reader)
Loads standard spellings from a reader.
|
void |
loadStandardSpellings(java.net.URL url,
boolean compressed,
java.lang.String encoding)
Loads standard spellings from a URL.
|
void |
loadStandardSpellings(java.net.URL url,
java.lang.String encoding)
Loads standard spellings from a URL.
|
java.lang.String |
preprocessSpelling(java.lang.String spelling)
Preprocess spelling.
|
void |
setMappedSpellings(TaggedStrings standardMappedSpellings)
Sets map which maps alternate spellings to standard spellings.
|
void |
setStandardSpellings(java.util.Set<java.lang.String> standardSpellings)
Sets standard spellings.
|
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.
|
void loadAlternativeSpellings(java.net.URL url,
boolean compressed,
java.lang.String encoding,
java.lang.String delimChars)
throws java.io.IOException
url - URL containing alternate spellings to
standard spellings mappings.compressed - true if gzip compressedencoding - Character set encoding for spellingsdelimChars - Delimiter characters separating spelling pairsjava.io.IOExceptionvoid loadAlternativeSpellings(java.net.URL url,
java.lang.String encoding,
java.lang.String delimChars)
throws java.io.IOException
url - URL containing alternate spellings to
standard spellings mappings.encoding - Character set encoding for spellingsdelimChars - Delimiter characters separating spelling pairsjava.io.IOExceptionvoid loadAlternativeSpellings(java.io.Reader reader,
java.lang.String delimChars)
throws java.io.IOException
reader - The reader.delimChars - Delimiter characters separating spelling pairs.java.io.IOExceptionvoid loadAlternativeSpellingsByWordClass(java.net.URL url,
java.lang.String encoding)
throws java.io.IOException
url - URL of alternative spellings by word class.encoding - Character set encoding for spellingsjava.io.IOExceptionvoid loadStandardSpellings(java.net.URL url,
boolean compressed,
java.lang.String encoding)
throws java.io.IOException
url - URL containing standard spellingscompressed - true if gzip compressedencoding - Character set encoding for spellingsjava.io.IOExceptionvoid loadStandardSpellings(java.net.URL url,
java.lang.String encoding)
throws java.io.IOException
url - URL containing standard spellingsencoding - Character set encoding for spellingsjava.io.IOExceptionvoid loadStandardSpellings(java.io.Reader reader)
throws java.io.IOException
reader - The reader.java.io.IOExceptionvoid setMappedSpellings(TaggedStrings standardMappedSpellings)
standardMappedSpellings - TaggedStrings with alternate
spellings as keys and standard
spellings as tag values.void setStandardSpellings(java.util.Set<java.lang.String> standardSpellings)
standardSpellings - Set of standard spellings.void addMappedSpelling(java.lang.String alternateSpelling,
java.lang.String standardSpelling)
alternateSpelling - The alternate spelling.standardSpelling - The corresponding standard spelling.void addStandardSpelling(java.lang.String standardSpelling)
standardSpelling - A standard spelling.void addStandardSpellings(java.util.Collection<java.lang.String> standardSpellings)
standardSpellings - A collection of standard spellings.java.lang.String preprocessSpelling(java.lang.String spelling)
spelling - Spelling to preprocess before standardization.java.lang.String[] standardizeSpelling(java.lang.String spelling)
spelling - The spelling.java.lang.String standardizeSpelling(java.lang.String spelling,
java.lang.String wordClass)
spelling - The spelling.wordClass - The word class.java.lang.String fixCapitalization(java.lang.String spelling,
java.lang.String standardSpelling)
spelling - The original spelling.standardSpelling - The candidate standard spelling.int getNumberOfAlternateSpellings()
int[] getNumberOfAlternateSpellingsByWordClass()
int getNumberOfStandardSpellings()
TaggedStrings getMappedSpellings()
java.util.Set<java.lang.String> getStandardSpellings()