opennlp.tools.sentdetect

## Interface SDContextGenerator

- All Known Implementing Classes:
    DefaultSDContextGenerator, SentenceContextGenerator

      public interface SDContextGenerator

  Interface for `SentenceDetectorME` context generators.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String[]` | `getContext(CharSequence s, int position)` Returns an array of contextual features for the potential sentence boundary at the specified position within the specified string buffer.

- - ### Method Detail

    - #### getContext

          String[] getContext(CharSequence s,
                              int position)

      Returns an array of contextual features for the potential sentence boundary at the specified position within the specified string buffer.
      Parameters:
        `s` - The `String` for which sentences are being determined.
        `position` - An index into the specified string buffer when a sentence boundary may occur.
      Returns:
        an array of contextual features for the potential sentence boundary at the specified position within the specified string buffer.

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