Class ENLemmatizer

    • Method Detail

      • getInstance

        public static ENLemmatizer getInstance()
        Returns:
        the singleton instance of the Lemmatizer
      • allPossibleLemmas

        public List<String> allPossibleLemmas​(@NonNull
                                              @NonNull String word,
                                              @NonNull
                                              @NonNull PartOfSpeech partOfSpeech)
        Description copied from interface: Lemmatizer
        Gets all lemmas.
        Specified by:
        allPossibleLemmas in interface Lemmatizer
        Parameters:
        word - the string
        partOfSpeech - the part of speech
        Returns:
        the all lemmas
      • allPossibleLemmasAndPrefixes

        public Trie<String> allPossibleLemmasAndPrefixes​(@NonNull
                                                         @NonNull String string,
                                                         @NonNull
                                                         @NonNull PartOfSpeech partOfSpeech)
        Description copied from interface: Lemmatizer
        Gets prefixed lemmas.
        Specified by:
        allPossibleLemmasAndPrefixes in interface Lemmatizer
        Parameters:
        string - the string
        partOfSpeech - the part of speech
        Returns:
        the prefixed lemmas
      • canLemmatize

        public boolean canLemmatize​(String input,
                                    PartOfSpeech partOfSpeech)
        Description copied from interface: Lemmatizer
        Can lemmatize boolean.
        Specified by:
        canLemmatize in interface Lemmatizer
        Parameters:
        input - the input
        partOfSpeech - the part of speech
        Returns:
        the boolean
      • lemmatize

        public String lemmatize​(@NonNull
                                @NonNull String string,
                                @NonNull
                                @NonNull PartOfSpeech partOfSpeech)
        Description copied from interface: Lemmatizer
        Determines the best lemma for a string given a part of speech
        Specified by:
        lemmatize in interface Lemmatizer
        Parameters:
        string - the string
        partOfSpeech - the part of speech
        Returns:
        the lemmatized version of the string