SentenceDetectorTool (Apache OpenNLP Tools 1.9.5 API)
Date: 2026-06-18

opennlp.tools.cmdline.sentdetect

## Class SentenceDetectorTool

- java.lang.Object
- - opennlp.tools.cmdline.CmdLineTool
  - - opennlp.tools.cmdline.BasicCmdLineTool
    - - opennlp.tools.cmdline.sentdetect.SentenceDetectorTool

-     public final class SentenceDetectorTool
      extends opennlp.tools.cmdline.BasicCmdLineTool

  A sentence detector which uses a maxent model to predict the sentences.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SentenceDetectorTool()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getHelp()` Retrieves a description on how to use the tool.
    `String` | `getShortDescription()` Retrieves a short description of what the tool does.
    `void` | `run(String[] args)` Perform sentence detection the input stream.

    - ### Methods inherited from class opennlp.tools.cmdline.CmdLineTool

      `getName, hasParams`

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

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

- - ### Constructor Detail

    - #### SentenceDetectorTool

          public SentenceDetectorTool()

  - ### Method Detail

    - #### getShortDescription

          public String getShortDescription()

      Description copied from class: `opennlp.tools.cmdline.CmdLineTool`
      Retrieves a short description of what the tool does.
      Overrides:
        `getShortDescription` in class `opennlp.tools.cmdline.CmdLineTool`
      Returns:
        a short description of what the tool does

    - #### getHelp

          public String getHelp()

      Description copied from class: `opennlp.tools.cmdline.CmdLineTool`
      Retrieves a description on how to use the tool.
      Specified by:
        `getHelp` in class `opennlp.tools.cmdline.CmdLineTool`
      Returns:
        a description on how to use the tool

    - #### run

          public void run(String[] args)

      Perform sentence detection the input stream. A newline will be treated as a paragraph boundary.
      Specified by:
        `run` in class `opennlp.tools.cmdline.BasicCmdLineTool`
      Parameters:
        `args` - arguments

Copyright © 2026 The Apache Software Foundation. All rights reserved.