Interface Dictionary


@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface Dictionary
This interface can be used to set an extra terms dictionary to be used on spell checking actions.
Since:
21
  • Method Summary

    Modifier and Type
    Method
    Description
    Get suggestions for the word from the dictionaries of a certain user.
    boolean
    isForbidden(String lang, String word)
    Check whether the word is forbidden considering dictionaries of a certain user.
    boolean
    isLearned(String lang, String word)
    Check whether the word is learned considering dictionaries of a certain user.
  • Method Details

    • isLearned

      boolean isLearned(String lang, String word)
      Check whether the word is learned considering dictionaries of a certain user.
      Parameters:
      lang - The language code, may be null. The language will be determined from the nearest ancestor with xml:lang attribute, otherwise will default to the user's interface language. Respects the xml:lang encoding (http://www.w3.org/TR/REC-xml/) Ex: "en", "en-GB", "en-US"
      word - The word to check.
      Returns:
      Whether the word is learned for a certain user.
    • isForbidden

      boolean isForbidden(String lang, String word)
      Check whether the word is forbidden considering dictionaries of a certain user.
      Parameters:
      lang - The language code, may be null. The language will be determined from the nearest ancestor with xml:lang attribute, otherwise will default to the user's interface language. Respects the xml:lang encoding (http://www.w3.org/TR/REC-xml/) Ex: "en", "en-GB", "en-US"
      word - The word to check.
      Returns:
      Whether the word is forbidden for a certain user.
    • getSuggestions

      String[] getSuggestions(String lang, String word)
      Get suggestions for the word from the dictionaries of a certain user.
      Parameters:
      lang - The language code, may be null. The language will be determined from the nearest ancestor with xml:lang attribute, otherwise will default to the user's interface language. Respects the xml:lang encoding (http://www.w3.org/TR/REC-xml/) Ex: "en", "en-GB", "en-US"
      word - The word to check.
      Returns:
      A list of suggestions for the word, sorted by relevance.