|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.utils.corpuslinguistics.spellingstandardizer.RemoteSpellingStandardizer
public class RemoteSpellingStandardizer
Remote Spelling Standardizer.
This spelling standardizer uses RMI calls to a spelling standardizer to find standardized spellings.
| Field Summary | |
|---|---|
protected Logger |
logger
Logger used for output. |
protected StandardizerServerSession |
session
The spelling standarizer server session, or null if none. |
| Constructor Summary | |
|---|---|
RemoteSpellingStandardizer()
Create spelling standardizer that uses a remote standardizer server. |
|
| Method Summary | |
|---|---|
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 standardSpellings)
Add standard spellings from a collection. |
void |
close()
Close standardizer. |
java.lang.String |
fixCapitalization(java.lang.String spelling,
java.lang.String standardSpelling)
Fix capitalization of standardized spelling. |
Logger |
getLogger()
Get the logger. |
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. |
protected void |
initializeServerSession()
Initializes the server session. |
void |
loadAlternativeSpellings(java.io.Reader reader,
java.lang.String delimChars)
Loads alternative spellings from a reader. |
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 spellingsURL,
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,
java.lang.String encoding)
Loads standard spellings from a URL. |
java.lang.String |
preprocessSpelling(java.lang.String spelling)
Preprocess spelling. |
void |
setLogger(Logger logger)
Set the logger. |
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. |
java.lang.String |
toString()
Return standardizer description. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected StandardizerServerSession session
protected Logger logger
| Constructor Detail |
|---|
public RemoteSpellingStandardizer()
| Method Detail |
|---|
protected void initializeServerSession()
public void loadAlternativeSpellings(java.net.URL url,
java.lang.String encoding,
java.lang.String delimChars)
throws java.io.IOException
loadAlternativeSpellings in interface SpellingStandardizerurl - URL containing alternate spellings to
standard spellings mappings.
Does nothing in this implementation.
encoding - Character set encoding for spellingsdelimChars - Delimiter characters separating spelling pairs
java.io.IOException
public void loadAlternativeSpellingsByWordClass(java.net.URL spellingsURL,
java.lang.String encoding)
throws java.io.IOException
loadAlternativeSpellingsByWordClass in interface SpellingStandardizerspellingsURL - URL of alternative spellings by word class.
Does nothing in this implementation.
encoding - Character set encoding for spellings
java.io.IOException
public void loadAlternativeSpellings(java.io.Reader reader,
java.lang.String delimChars)
throws java.io.IOException
loadAlternativeSpellings in interface SpellingStandardizerreader - The reader.delimChars - Delimiter characters separating spelling pairs.
Does nothing in this implementation.
java.io.IOException
public void loadStandardSpellings(java.net.URL url,
java.lang.String encoding)
throws java.io.IOException
loadStandardSpellings in interface SpellingStandardizerurl - URL containing standard spellingsencoding - Character set encoding for spellings
java.io.IOException
public void loadStandardSpellings(java.io.Reader reader)
throws java.io.IOException
loadStandardSpellings in interface SpellingStandardizerreader - The reader.
java.io.IOException
public void addMappedSpelling(java.lang.String alternateSpelling,
java.lang.String standardSpelling)
addMappedSpelling in interface SpellingStandardizeralternateSpelling - The alternate spelling.standardSpelling - The corresponding standard spelling.public void addStandardSpelling(java.lang.String standardSpelling)
addStandardSpelling in interface SpellingStandardizerstandardSpelling - A standard spelling.public void addStandardSpellings(java.util.Collection standardSpellings)
addStandardSpellings in interface SpellingStandardizerstandardSpellings - A collection of standard spellings.
Does nothing in this implementation.
public void setMappedSpellings(TaggedStrings standardMappedSpellings)
setMappedSpellings in interface SpellingStandardizerstandardMappedSpellings - TaggedStrings with alternate
spellings as keys and standard
spellings as tag values.
Does nothing in this implementation.
public void setStandardSpellings(java.util.Set<java.lang.String> standardSpellings)
setStandardSpellings in interface SpellingStandardizerstandardSpellings - Set of standard spellings.
Does nothing in this implementation.
public java.lang.String[] standardizeSpelling(java.lang.String spelling)
standardizeSpelling in interface SpellingStandardizerspelling - The spelling.
public java.lang.String standardizeSpelling(java.lang.String spelling,
java.lang.String wordClass)
standardizeSpelling in interface SpellingStandardizerspelling - The spelling.wordClass - The word class.
public int getNumberOfAlternateSpellings()
getNumberOfAlternateSpellings in interface SpellingStandardizerpublic int[] getNumberOfAlternateSpellingsByWordClass()
getNumberOfAlternateSpellingsByWordClass in interface SpellingStandardizerpublic int getNumberOfStandardSpellings()
getNumberOfStandardSpellings in interface SpellingStandardizerpublic TaggedStrings getMappedSpellings()
getMappedSpellings in interface SpellingStandardizerpublic java.util.Set<java.lang.String> getStandardSpellings()
getStandardSpellings in interface SpellingStandardizerpublic java.lang.String preprocessSpelling(java.lang.String spelling)
preprocessSpelling in interface SpellingStandardizerspelling - Spelling to preprocess.
Unused in this standardizer.
public java.lang.String fixCapitalization(java.lang.String spelling,
java.lang.String standardSpelling)
fixCapitalization in interface SpellingStandardizerspelling - The original spelling.standardSpelling - The candidate standard spelling.
Unused in this standardizer.
public void close()
public Logger getLogger()
getLogger in interface UsesLoggerpublic void setLogger(Logger logger)
setLogger in interface UsesLoggerlogger - The logger.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||