edu.northwestern.at.morphadorner.corpuslinguistics.contractionexpander

## Class EnglishContractionExpander

- java.lang.Object
- - edu.northwestern.at.utils.IsCloseableObject
  - - edu.northwestern.at.morphadorner.corpuslinguistics.contractionexpander.AbstractContractionExpander
    - - edu.northwestern.at.morphadorner.corpuslinguistics.contractionexpander.EnglishContractionExpander

- All Implemented Interfaces:
    ContractionExpander, UsesLogger
  Direct Known Subclasses:
    DefaultContractionExpander

      public class EnglishContractionExpander
      extends AbstractContractionExpander
      implements ContractionExpander

  A contraction expander for English.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static java.lang.String` | `contractedSpellingsFileName` Path to list of contracted spellings.
    `protected WordTokenizer` | `contractionTokenizer` Contraction tokenizer.

    - ### Fields inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.contractionexpander.AbstractContractionExpander

      `contractedSpellings, logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EnglishContractionExpander()` Create an English contraction expander.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `expandContraction(java.lang.String spelling)` Returns an expanded spelling for a contracted spelling.

    - ### Methods inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.contractionexpander.AbstractContractionExpander

      `getLogger, loadContractedSpellings, setLogger`

    - ### Methods inherited from class edu.northwestern.at.utils.IsCloseableObject

      `close`

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

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

- - ### Field Detail

    - #### contractedSpellingsFileName

          protected static java.lang.String contractedSpellingsFileName

      Path to list of contracted spellings.

      The contracted spellings file contains pairs of contracted forms and expanded forms separated by a tab character. Each line of the file contains one pair.

    - #### contractionTokenizer

          protected WordTokenizer contractionTokenizer

      Contraction tokenizer.

  - ### Constructor Detail

    - #### EnglishContractionExpander

          public EnglishContractionExpander()

      Create an English contraction expander.

  - ### Method Detail

    - #### expandContraction

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

      Returns an expanded spelling for a contracted spelling.
      Specified by:
        `expandContraction` in interface `ContractionExpander`
      Overrides:
        `expandContraction` in class `AbstractContractionExpander`
      Parameters:
        `spelling` - The spelling.
      Returns:
        The expanded form of the contraction.