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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String[] getSuggestions​(java.lang.String lang, java.lang.String word)
      Get suggestions for the word from the dictionaries of a certain user.
      boolean isForbidden​(java.lang.String lang, java.lang.String word)
      Check whether the word is forbidden considering dictionaries of a certain user.
      boolean isLearned​(java.lang.String lang, java.lang.String word)
      Check whether the word is learned considering dictionaries of a certain user.
    • Method Detail

      • isLearned

        boolean isLearned​(java.lang.String lang,
                          java.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​(java.lang.String lang,
                            java.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

        java.lang.String[] getSuggestions​(java.lang.String lang,
                                          java.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.