Package opennlp.tools.postag

# Interface POSTagger

public interface POSTagger
The interface for part of speech taggers.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `tag(String[] sentence)`
  Assigns the sentence of tokens pos tags.
  `String[]`
  `tag(String[] sentence, Object[] additionalContext)`
  Assigns the sentence of tokens pos tags.
  `Sequence[]`
  `topKSequences(String[] sentence)`
  Assigns the sentence the top-k `sequences`.
  `Sequence[]`
  `topKSequences(String[] sentence, Object[] additionalContext)`
  Assigns the sentence the top-k `sequences`.

- ## Method Details

  - ### tag

    String[] tag(String[] sentence)
    Assigns the sentence of tokens pos tags.
    Parameters:
      `sentence` - The sentence of tokens to be tagged.
    Returns:
      An array of pos tags for each token provided in `sentence`.

  - ### tag

    String[] tag(String[] sentence, Object[] additionalContext)
    Assigns the sentence of tokens pos tags.
    Parameters:
      `sentence` - The sentence of tokens to be tagged.
      `additionalContext` - The context to provide additional information with.
    Returns:
      An array of pos tags for each token provided in `sentence`.

  - ### topKSequences

    Sequence[] topKSequences(String[] sentence)
    Assigns the sentence the top-k `sequences`.
    Parameters:
      `sentence` - The sentence of tokens to be tagged.
    Returns:
      An array of `sequences` for each token provided in `sentence`.

  - ### topKSequences

    Sequence[] topKSequences(String[] sentence, Object[] additionalContext)
    Assigns the sentence the top-k `sequences`.
    Parameters:
      `sentence` - The sentence of tokens to be tagged.
      `additionalContext` - The context to provide additional information with.
    Returns:
      An array of `sequences` for each token provided in `sentence`.