opennlp.tools.util

## Class TokenTag

- java.lang.Object
- - opennlp.tools.util.TokenTag

-     public class TokenTag
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenTag(String token, String tag, String[] addtionalData)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TokenTag[]` | `create(String[] toks, String[] tags)`
    `boolean` | `equals(Object o)`
    `static String[]` | `extractTags(TokenTag[] tuples)`
    `static String[]` | `extractTokens(TokenTag[] tuples)`
    `String[]` | `getAddtionalData()`
    `String` | `getTag()`
    `String` | `getToken()`
    `int` | `hashCode()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### TokenTag

          public TokenTag(String token,
                          String tag,
                          String[] addtionalData)

  - ### Method Detail

    - #### getToken

          public String getToken()

    - #### getTag

          public String getTag()

    - #### getAddtionalData

          public String[] getAddtionalData()

    - #### extractTokens

          public static String[] extractTokens(TokenTag[] tuples)

    - #### extractTags

          public static String[] extractTags(TokenTag[] tuples)

    - #### create

          public static TokenTag[] create(String[] toks,
                                          String[] tags)

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2026 The Apache Software Foundation. All rights reserved.