edu.northwestern.at.morphadorner.corpuslinguistics.partsofspeech.mapper

## Class AbstractPartOfSpeechTagsMapper

- java.lang.Object
- - edu.northwestern.at.utils.IsCloseableObject
  - - edu.northwestern.at.morphadorner.corpuslinguistics.partsofspeech.mapper.AbstractPartOfSpeechTagsMapper

- All Implemented Interfaces:
    PartOfSpeechTagsMapper, IsCloseable
  Direct Known Subclasses:
    NoopPartOfSpeechTagsMapper

      public abstract class AbstractPartOfSpeechTagsMapper
      extends IsCloseableObject
      implements PartOfSpeechTagsMapper, IsCloseable

  AbstractPartOfSpeechTagsMapper: Base class for PartOfSpeechTagsMapper implementations.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `destinationTagSeparator`
    `protected UTF8Properties` | `partOfSpeechTagsMap` Part of speech tags map.
    `protected java.lang.String` | `sourceTagSeparator` Character separating multiple part of speech tags.
    `protected java.lang.String` | `unknownTag` Value to return for Unknown source tag.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractPartOfSpeechTagsMapper()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getTag(java.lang.String spelling, java.lang.String sourceTag)` Get destination part of speech tag for a source part of speech tag.
    `java.lang.String` | `toString()` Return string form of tag set.

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

      `close`

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

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

    - ### Methods inherited from interface edu.northwestern.at.utils.IsCloseable

      `close`

- - ### Field Detail

    - #### partOfSpeechTagsMap

          protected UTF8Properties partOfSpeechTagsMap

      Part of speech tags map.

      Key is source part of speech tag, value is destination part of speech tag.

    - #### sourceTagSeparator

          protected java.lang.String sourceTagSeparator

      Character separating multiple part of speech tags.

    - #### destinationTagSeparator

          protected java.lang.String destinationTagSeparator

    - #### unknownTag

          protected java.lang.String unknownTag

      Value to return for Unknown source tag.

  - ### Constructor Detail

    - #### AbstractPartOfSpeechTagsMapper

          public AbstractPartOfSpeechTagsMapper()

  - ### Method Detail

    - #### getTag

          public java.lang.String getTag(java.lang.String spelling,
                                java.lang.String sourceTag)

      Get destination part of speech tag for a source part of speech tag.
      Specified by:
        `getTag` in interface `PartOfSpeechTagsMapper`
      Parameters:
        `spelling` - Spelling.
        `sourceTag` - Source tag name.
      Returns:
        Destination tag name. Returns unknown tag value if source unrecognized.

        If the source tag contains one or more tag separators, the result will contain the respective mapped destination tags separated by tag separators.

    - #### toString

          public java.lang.String toString()

      Return string form of tag set.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        String form of part of speech tags map.