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

opennlp.tools.postag

## Interface MutableTagDictionary

- All Superinterfaces:
    TagDictionary
  All Known Implementing Classes:
    POSDictionary

      public interface MutableTagDictionary
      extends TagDictionary

  Interface that allows `TagDictionary` entries to be added and removed. This can be used to induce the dictionary from training data.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isCaseSensitive()` Whether if the dictionary is case sensitive or not
    `String[]` | `put(String word, String... tags)` Associates the specified tags with the specified word.

    - ### Methods inherited from interface opennlp.tools.postag.TagDictionary

      `getTags`

- - ### Method Detail

    - #### put

          String[] put(String word,
                       String... tags)

      Associates the specified tags with the specified word. If the dictionary previously contained keys for the word, the old tags are replaced by the specified tags.
      Parameters:
        `word` - word with which the specified tags is to be associated
        `tags` - tags to be associated with the specified word
      Returns:
        the previous tags associated with the word, or null if there was no mapping for word.

    - #### isCaseSensitive

          boolean isCaseSensitive()

      Whether if the dictionary is case sensitive or not
      Returns:
        true if the dictionary is case sensitive

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