Class DefaultEndOfSentenceScanner

java.lang.Object
opennlp.tools.sentdetect.DefaultEndOfSentenceScanner
All Implemented Interfaces:
opennlp.tools.sentdetect.EndOfSentenceScanner

public class DefaultEndOfSentenceScanner extends Object implements opennlp.tools.sentdetect.EndOfSentenceScanner
Default implementation of the EndOfSentenceScanner. It uses a character array with possible end of sentence chars to identify potential sentence endings.
  • 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)
      Specified by:
      getPositions in interface opennlp.tools.sentdetect.EndOfSentenceScanner
    • getPositions

      public List<Integer> getPositions(StringBuffer buf)
      Specified by:
      getPositions in interface opennlp.tools.sentdetect.EndOfSentenceScanner
    • getPositions

      public List<Integer> getPositions(char[] cbuf)
      Specified by:
      getPositions in interface opennlp.tools.sentdetect.EndOfSentenceScanner
    • getEOSCharacters

      public Set<Character> getEOSCharacters()
      Specified by:
      getEOSCharacters in interface opennlp.tools.sentdetect.EndOfSentenceScanner