DefaultSDContextGenerator (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.sentdetect, class: DefaultSDContextGenerator

Package opennlp.tools.sentdetect

# Class DefaultSDContextGenerator

java.lang.Object
opennlp.tools.sentdetect.DefaultSDContextGenerator

All Implemented Interfaces:
  `opennlp.tools.sentdetect.SDContextGenerator`

Direct Known Subclasses:
  `SentenceContextGenerator`

public class DefaultSDContextGenerator extends Object implements opennlp.tools.sentdetect.SDContextGenerator
Generate event contexts for maxent decisions for sentence detection.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultSDContextGenerator(char[] eosCharacters)`
  Creates a new instance with no induced abbreviations.
  `DefaultSDContextGenerator(Set<String> inducedAbbreviations, char[] eosCharacters)`
  Creates a new `SDContextGenerator` instance which uses the set of induced abbreviations.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `getContext(CharSequence sb, int position)`

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

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

- ## Constructor Details

  - ### DefaultSDContextGenerator

    public DefaultSDContextGenerator(char[] eosCharacters)
    Creates a new instance with no induced abbreviations.
    Parameters:
      `eosCharacters` - The characters to be used to detect sentence endings.

  - ### DefaultSDContextGenerator

    public DefaultSDContextGenerator(Set<String> inducedAbbreviations, char[] eosCharacters)
    Creates a new `SDContextGenerator` instance which uses the set of induced abbreviations.
    Parameters:
      `inducedAbbreviations` - a `Set` of Strings representing induced abbreviations in the training data. Example: "Mr."
      `eosCharacters` - The characters to be used to detect sentence endings.

- ## Method Details

  - ### getContext

    public String[] getContext(CharSequence sb, int position)
    Specified by:
      `getContext` in interface `opennlp.tools.sentdetect.SDContextGenerator`