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

# Class CheckContextGenerator

java.lang.Object
opennlp.tools.parser.AbstractContextGenerator
opennlp.tools.parser.chunking.CheckContextGenerator

public class CheckContextGenerator extends AbstractContextGenerator
Generates predictive context for deciding when a constituent is complete.

See Also:
  - `AbstractContextGenerator`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CheckContextGenerator()`
  Instantiates a `CheckContextGenerator` for generating predictive context for deciding when a constituent is complete.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `getContext(Object o)`
  `String[]`
  `getContext(Parse[] constituents, String type, int start, int end)`
  Finds predictive context for deciding whether the specified constituents between the specified `start` and `end` index can be combined to form a new constituent of the specified `type`.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### CheckContextGenerator

    public CheckContextGenerator()
    Instantiates a `CheckContextGenerator` for generating predictive context for deciding when a constituent is complete.

- ## Method Details

  - ### getContext

    public String[] getContext(Object o)

  - ### getContext

    public String[] getContext(Parse[] constituents, String type, int start, int end)
    Finds predictive context for deciding whether the specified constituents between the specified `start` and `end` index can be combined to form a new constituent of the specified `type`.
    Parameters:
      `constituents` - The `constituents` which have yet to be combined into new constituents.
      `type` - The type of the new constituent proposed.
      `start` - The first constituent of the proposed constituent.
      `end` - The last constituent of the proposed constituent.
    Returns:
      The predictive context for deciding whether a new constituent should be created.