edu.northwestern.at.morphadorner.corpuslinguistics.spellingmapper

## Class USToBritishSpellingMapper

- java.lang.Object
- - edu.northwestern.at.morphadorner.corpuslinguistics.spellingmapper.USToBritishSpellingMapper

- All Implemented Interfaces:
    SpellingMapper

      public class USToBritishSpellingMapper
      extends java.lang.Object
      implements SpellingMapper

  Maps American to British spellings.

- - ### Field Summary

    Fields
    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 Summary

    Constructors
    Constructor and Description
    `USToBritishSpellingMapper()` Create US to British spelling mapper.

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### wordMapPath

          protected static final java.lang.String wordMapPath

      Resource file with British/American mappings.
      See Also:
        Constant Field Values

    - #### USToBritMap

          protected static java.util.Map<java.lang.String,java.lang.String> USToBritMap

      Hash map with American spelling as key and British spelling as value.

  - ### Constructor Detail

    - #### USToBritishSpellingMapper

          public USToBritishSpellingMapper()

      Create US to British spelling mapper.

  - ### Method Detail

    - #### loadUSToBritishWordMap

          protected void loadUSToBritishWordMap()
                                         throws java.net.MalformedURLException,
                                                java.io.IOException

      Load the US to British mapping data.
      Throws:
        `java.net.MalformedURLException`
        `java.io.IOException`

    - #### mapSpelling

          public java.lang.String mapSpelling(java.lang.String spelling)

      Returns British spelling given a U. S. spelling.
      Specified by:
        `mapSpelling` in interface `SpellingMapper`
      Parameters:
        `spelling` - The spelling.
      Returns:
        The mapped spelling.