Package opennlp.tools.chunker

# Class DefaultChunkerContextGenerator

java.lang.Object
opennlp.tools.chunker.DefaultChunkerContextGenerator

All Implemented Interfaces:
  `opennlp.tools.chunker.ChunkerContextGenerator`, `opennlp.tools.util.BeamSearchContextGenerator<opennlp.tools.util.TokenTag>`

public class DefaultChunkerContextGenerator extends Object implements opennlp.tools.chunker.ChunkerContextGenerator
Features based on chunking model described in Fei Sha and Fernando Pereira. Shallow parsing with conditional random fields. In Proceedings of HLT-NAACL 2003. Association for Computational Linguistics, 2003.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultChunkerContextGenerator()`
  Initializes a `DefaultChunkerContextGenerator` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `getContext(int i, String[] toks, String[] tags, String[] preds)`
  `String[]`
  `getContext(int index, opennlp.tools.util.TokenTag[] sequence, String[] priorDecisions, Object[] additionalContext)`

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

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

- ## Constructor Details

  - ### DefaultChunkerContextGenerator

    public DefaultChunkerContextGenerator()
    Initializes a `DefaultChunkerContextGenerator` instance.

- ## Method Details

  - ### getContext

    public String[] getContext(int i, String[] toks, String[] tags, String[] preds)
    Specified by:
      `getContext` in interface `opennlp.tools.chunker.ChunkerContextGenerator`

  - ### getContext

    public String[] getContext(int index, opennlp.tools.util.TokenTag[] sequence, String[] priorDecisions, Object[] additionalContext)
    Specified by:
      `getContext` in interface `opennlp.tools.util.BeamSearchContextGenerator<opennlp.tools.util.TokenTag>`