Package opennlp.tools.parser.treeinsert

## Class CheckContextGenerator

- java.lang.Object
- - opennlp.tools.parser.AbstractContextGenerator
  - - opennlp.tools.parser.treeinsert.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​(Set<String> punctSet)` | Instantiates a `CheckContextGenerator` for making decisions using a `punctSet`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String[]` | `getContext​(Object o)` |
    `String[]` | `getContext​(Parse parent, Parse[] constituents, int index, boolean trimFrontier)` | Finds the predictive context used to determine how constituent at the specified `index` should be combined with a `parent` constituent.

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

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

- - ### Constructor Detail

    - #### CheckContextGenerator

          public CheckContextGenerator​(Set<String> punctSet)

      Instantiates a `CheckContextGenerator` for making decisions using a `punctSet`.
      Parameters:
        `punctSet` - A set of punctuation symbols to be used during context generation.

  - ### Method Detail

    - #### getContext

          public String[] getContext​(Object o)

    - #### getContext

          public String[] getContext​(Parse parent,
                                     Parse[] constituents,
                                     int index,
                                     boolean trimFrontier)

      Finds the predictive context used to determine how constituent at the specified `index` should be combined with a `parent` constituent.
      Parameters:
        `parent` - The `parent` element.
        `constituents` - The `constituents` which have yet to be combined into new constituents.
        `index` - The index of the constituent which is being considered.
        `trimFrontier` - Whether the frontier should be trimmed, or not.
      Returns:
        The context for deciding whether a new constituent should be created.