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