LemmaSample (Apache OpenNLP :: API 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.lemmatizer, class: LemmaSample

Package opennlp.tools.lemmatizer

# Class LemmaSample

java.lang.Object
opennlp.tools.lemmatizer.LemmaSample

All Implemented Interfaces:
  `Serializable`, `Sample`

public class LemmaSample extends Object implements Sample
Represents a lemmatized sentence.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LemmaSample(String[] tokens, String[] tags, String[] lemmas)`
  Initializes a `LemmaSample` instance with the given parameters.
  `LemmaSample(List<String> tokens, List<String> tags, List<String> lemmas)`
  Initializes a `LemmaSample` instance with the given parameters.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `String[]`
  `getLemmas()`
  `String[]`
  `getTags()`
  `String[]`
  `getTokens()`
  `int`
  `hashCode()`
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### LemmaSample

    public LemmaSample(String[] tokens, String[] tags, String[] lemmas)
    Initializes a `LemmaSample` instance with the given parameters.
    Parameters:
      `tokens` - The tokens.
      `tags` - The postags.
      `lemmas` - The lemmas for `tokens`.

  - ### LemmaSample

    public LemmaSample(List<String> tokens, List<String> tags, List<String> lemmas)
    Initializes a `LemmaSample` instance with the given parameters.
    Parameters:
      `tokens` - The tokens.
      `tags` - The postags.
      `lemmas` - The lemmas for `tokens`.

- ## Method Details

  - ### getTokens

    public String[] getTokens()
    Returns:
      Retrieves the tokens of a `LemmaSample`.

  - ### getTags

    public String[] getTags()
    Returns:
      Retrieves the postags of a `LemmaSample`.

  - ### getLemmas

    public String[] getLemmas()
    Returns:
      Retrieves the lemmas of a `LemmaSample`.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`