Constituent (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.parser, class: Constituent

# Class Constituent

java.lang.Object
opennlp.tools.parser.Constituent

public class Constituent extends Object
Holds constituents when reading `parses`.

See Also:
  - `Parse`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Constituent(String label, Span span)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getLabel()`
  Returns the label of the constituent.
  `Span`
  `getSpan()`
  Returns the span of the constituent.
  `void`
  `setLabel(String label)`
  Assigns the label to the constituent.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### Constituent

    public Constituent(String label, Span span)

- ## Method Details

  - ### getLabel

    public String getLabel()
    Returns the label of the constituent.
    Returns:
      the label of the constituent.

  - ### setLabel

    public void setLabel(String label)
    Assigns the label to the constituent.
    Parameters:
      `label` - The label to set.

  - ### getSpan

    public Span getSpan()
    Returns the span of the constituent.
    Returns:
      the span of the constituent.