edu.northwestern.at.morphadorner.corpuslinguistics.apostokens

## Class AposTokens

- java.lang.Object
- - edu.northwestern.at.morphadorner.corpuslinguistics.apostokens.AposTokens

-     public class AposTokens
      extends java.lang.Object

  Tokens which start or end with an apostrophe.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.Set<java.lang.String>` | `aposTokens`
    `protected static java.lang.String` | `defaultAposTokensFileName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AposTokens()` Create AposTokens.
    `AposTokens(java.lang.String langCode)` Create AposTokens for specified ISO language code.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Set<java.lang.String>` | `getAposTokens()` Return current aposTokens.
    `int` | `getAposTokensCount()` Get count of known aposrophe Tokens.
    `boolean` | `isKnownAposToken(java.lang.String str)` Checks if string is a known token with apostrophe.
    `boolean` | `loadAposTokens(java.lang.String aposTokensURL)` Load aposTokens list from a file.
    `static java.util.Set<java.lang.String>` | `loadAposTokensFromResource(java.lang.String langCode)` Load apostrophe tokens set from resource properties file.

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

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

- - ### Field Detail

    - #### aposTokens

          protected java.util.Set<java.lang.String> aposTokens

    - #### defaultAposTokensFileName

          protected static final java.lang.String defaultAposTokensFileName

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AposTokens

          public AposTokens()

      Create AposTokens. Assumes English.

    - #### AposTokens

          public AposTokens(java.lang.String langCode)

      Create AposTokens for specified ISO language code.
      Parameters:
        `langCode` - ISO language code.

  - ### Method Detail

    - #### loadAposTokensFromResource

          public static java.util.Set<java.lang.String> loadAposTokensFromResource(java.lang.String langCode)

      Load apostrophe tokens set from resource properties file.

      Each line in the UTF8 apostrophe tokens contains a single tokens which begins or ends with an apostrophe.

      if there is not a resource file for the given language code, the aposTokens set will be empty.

    - #### loadAposTokens

          public boolean loadAposTokens(java.lang.String aposTokensURL)

      Load aposTokens list from a file.
      Parameters:
        `aposTokensURL` - AposTokens URL.
      Returns:
        true if aposTokens loaded OK, false if error occurred.

    - #### isKnownAposToken

          public boolean isKnownAposToken(java.lang.String str)

      Checks if string is a known token with apostrophe.
      Parameters:
        `str` - The string to check.
      Returns:
        true if "str" is on the known apostrophe tokens list.

    - #### getAposTokensCount

          public int getAposTokensCount()

      Get count of known aposrophe Tokens.
      Returns:
        Count of known apostrophe tokens.

    - #### getAposTokens

          public java.util.Set<java.lang.String> getAposTokens()

      Return current aposTokens.
      Returns:
        AposTokens.