public class BritishToUSSpellingMapper extends java.lang.Object implements SpellingMapper
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.Map<java.lang.String,java.lang.String> |
britToUSMap
Hash map with British spelling as key and American spelling as value.
|
protected static java.lang.String |
wordMapPath
Resource file with British/American mappings.
|
| Constructor and Description |
|---|
BritishToUSSpellingMapper()
Create British to US spelling mapper.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
loadBritishToUSWordMap()
Load the British to US mapping data.
|
java.lang.String |
mapSpelling(java.lang.String spelling)
Returns U.S.
|
protected static final java.lang.String wordMapPath
protected static java.util.Map<java.lang.String,java.lang.String> britToUSMap
public BritishToUSSpellingMapper()
protected void loadBritishToUSWordMap()
throws java.net.MalformedURLException,
java.io.IOException
java.net.MalformedURLExceptionjava.io.IOExceptionpublic java.lang.String mapSpelling(java.lang.String spelling)
mapSpelling in interface SpellingMapperspelling - The spelling.