Package opennlp.tools.formats.masc

## Class MascToken

- java.lang.Object
- - opennlp.tools.util.Span
  - - opennlp.tools.formats.masc.MascToken

- All Implemented Interfaces:
    `Serializable`, `Comparable<Span>`

      public class MascToken
      extends Span

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MascToken​(int s, int e, int pennId, String pos, String base, MascWord[] quarks)` | Create a MascToken, which may combine multiple quarks

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getBase()` | Get the base form
    `String` | `getPos()` | Get the POS tag
    `MascWord[]` | `getQuarks()` | Get quarks of the token
    `int` | `getTokenId()` | Get ID of the token

    - ### Methods inherited from class opennlp.tools.util.Span

      `compareTo, contains, contains, crosses, equals, getCoveredText, getEnd, getProb, getStart, getType, hashCode, intersects, length, spansToStrings, spansToStrings, startsWith, toString, trim`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### MascToken

          public MascToken​(int s,
                           int e,
                           int pennId,
                           String pos,
                           String base,
                           MascWord[] quarks)

      Create a MascToken, which may combine multiple quarks
      Parameters:
        `s` - The start of the token in the corpus file
        `e` - The end of the token in the corpus file
        `pennId` - The ID of the token as assigned by the Penn stand-off annotation
        `pos` - The POS-tag
        `base` - The base form
        `quarks` - Quarks contained in the token

  - ### Method Detail

    - #### getTokenId

          public int getTokenId()

      Get ID of the token
      Returns:
        the ID

    - #### getBase

          public String getBase()

      Get the base form
      Returns:
        the base form

    - #### getPos

          public String getPos()

      Get the POS tag
      Returns:
        POS tag

    - #### getQuarks

          public MascWord[] getQuarks()

      Get quarks of the token
      Returns:
        Array of quark references