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

opennlp.tools.postag

## Interface POSTagger

- All Known Implementing Classes:
    POSTaggerME

      public interface POSTagger

  The interface for part of speech taggers.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String[]` | `tag(String[] sentence)` Assigns the sentence of tokens pos tags.
    `String[]` | `tag(String[] sentence, Object[] additionaContext)`
    `Sequence[]` | `topKSequences(String[] sentence)`
    `Sequence[]` | `topKSequences(String[] sentence, Object[] additionaContext)`

- - ### Method Detail

    - #### tag

          String[] tag(String[] sentence)

      Assigns the sentence of tokens pos tags.
      Parameters:
        `sentence` - The sentece of tokens to be tagged.
      Returns:
        an array of pos tags for each token provided in sentence.

    - #### tag

          String[] tag(String[] sentence,
                       Object[] additionaContext)

    - #### topKSequences

          Sequence[] topKSequences(String[] sentence)

    - #### topKSequences

          Sequence[] topKSequences(String[] sentence,
                                   Object[] additionaContext)

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