Package opennlp.tools.sentdetect

# Class NewlineSentenceDetector

java.lang.Object
opennlp.tools.sentdetect.NewlineSentenceDetector

All Implemented Interfaces:
  `SentenceDetector`

public class NewlineSentenceDetector extends Object implements SentenceDetector
The Newline `SentenceDetector` assumes that sentences are line delimited and recognizes one sentence per non-empty line.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NewlineSentenceDetector()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `sentDetect(CharSequence s)`
  Detects sentences in a character sequence.
  `Span[]`
  `sentPosDetect(CharSequence s)`
  Detects sentences in a character sequence.

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

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

- ## Constructor Details

  - ### NewlineSentenceDetector

    public NewlineSentenceDetector()

- ## Method Details

  - ### sentDetect

    public String[] sentDetect(CharSequence s)
    Description copied from interface: `SentenceDetector`
    Detects sentences in a character sequence.
    Specified by:
      `sentDetect` in interface `SentenceDetector`
    Parameters:
      `s` - The `CharSequence` for which sentences shall to be detected.
    Returns:
      The String[] with the individual sentences as the array elements.

  - ### sentPosDetect

    public Span[] sentPosDetect(CharSequence s)
    Description copied from interface: `SentenceDetector`
    Detects sentences in a character sequence.
    Specified by:
      `sentPosDetect` in interface `SentenceDetector`
    Parameters:
      `s` - The `CharSequence` for which sentences shall be detected.
    Returns:
      The array of `spans` (offsets into `s`) for each detected sentence as the individuals array elements.