org.apache.lucene.analysis.hunspell

## Interface DictEntries

-     public interface DictEntries

  An object representing homonym dictionary entries. Note that the order of entries here may differ from the order in the *.dic file!
  See Also:
    `Dictionary.lookupEntries(java.lang.String)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getMorphologicalData(int entryIndex)`
    `List<String>` | `getMorphologicalValues(int entryIndex, String key)`
    `int` | `size()`

- - ### Method Detail

    - #### size

          int size()

      Returns:
        a positive number of dictionary entries with the same word. Most often it's 1 (unless there are homonyms). Entries are indexed from 0 to `size() - 1` and these indices can be passed into other methods of this class.

    - #### getMorphologicalData

          String getMorphologicalData(int entryIndex)

      Parameters:
        `entryIndex` - an index from 0 (inclusive) to `size()` (exclusive)
      Returns:
        morphological fields (of `kk:vvvvvv` form, sorted, space-separated, excluding `ph:`) associated with the homonym at the given entry index, or an empty string

    - #### getMorphologicalValues

          List<String> getMorphologicalValues(int entryIndex,
                                              String key)

      Parameters:
        `entryIndex` - an index from 0 (inclusive) to `size()` (exclusive)
        `key` - the key in the form `kk:` by which to filter the morphological fields
      Returns:
        the values (of `vvvvvv` form) of morphological fields with the given key associated with the homonym at the given entry index

Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.