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

# Class DefaultEndOfSentenceScanner

java.lang.Object
opennlp.tools.sentdetect.DefaultEndOfSentenceScanner

All Implemented Interfaces:
  `EndOfSentenceScanner`

public class DefaultEndOfSentenceScanner extends Object implements EndOfSentenceScanner
Default implementation of the `EndOfSentenceScanner`. It uses a character array with possible end of sentence chars to identify potential sentence endings.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultEndOfSentenceScanner(char[] eosCharacters)`
  Initializes the current instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Set<Character>`
  `getEOSCharacters()`
  `List<Integer>`
  `getPositions(char[] cbuf)`
  The receiver scans `cbuf` for sentence ending characters and returns their offsets.
  `List<Integer>`
  `getPositions(CharSequence s)`
  The receiver scans the specified string for sentence ending characters and returns their offsets.
  `List<Integer>`
  `getPositions(StringBuffer buf)`
  The receiver scans `buf` for sentence ending characters and returns their offsets.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### DefaultEndOfSentenceScanner

    public DefaultEndOfSentenceScanner(char[] eosCharacters)
    Initializes the current instance.
    Parameters:
      `eosCharacters` - The characters to be used to detect sentence endings.

- ## Method Details

  - ### getPositions

    public List<Integer> getPositions(CharSequence s)
    Description copied from interface: `EndOfSentenceScanner`
    The receiver scans the specified string for sentence ending characters and returns their offsets.
    Specified by:
      `getPositions` in interface `EndOfSentenceScanner`
    Parameters:
      `s` - A `CharSequence` to be scanned.
    Returns:
      A `List` of Integer objects.

  - ### getPositions

    public List<Integer> getPositions(StringBuffer buf)
    Description copied from interface: `EndOfSentenceScanner`
    The receiver scans `buf` for sentence ending characters and returns their offsets.
    Specified by:
      `getPositions` in interface `EndOfSentenceScanner`
    Parameters:
      `buf` - A `StringBuffer` to be scanned.
    Returns:
      A `List` of Integer objects.

  - ### getPositions

    public List<Integer> getPositions(char[] cbuf)
    Description copied from interface: `EndOfSentenceScanner`
    The receiver scans `cbuf` for sentence ending characters and returns their offsets.
    Specified by:
      `getPositions` in interface `EndOfSentenceScanner`
    Parameters:
      `cbuf` - A `char[]` to be scanned.
    Returns:
      A `List` of Integer objects.

  - ### getEOSCharacters

    public Set<Character> getEOSCharacters()
    Specified by:
      `getEOSCharacters` in interface `EndOfSentenceScanner`
    Returns:
      a set of `characters` which can indicate the end of a sentence.