Package com.gengoai.hermes.morphology
Interface Lemmatizer
-
- All Known Implementing Classes:
ENLemmatizer
public interface Lemmatizer
Defines the interface for lemmatizing tokens.
- Author:
- David B. Bracewell
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<String>
allPossibleLemmas(String string, PartOfSpeech partOfSpeech)
Gets all lemmas.Trie<String>
allPossibleLemmasAndPrefixes(String string, PartOfSpeech partOfSpeech)
Gets prefixed lemmas.boolean
canLemmatize(String input, PartOfSpeech partOfSpeech)
Can lemmatize boolean.default String
lemmatize(@NonNull HString fragment)
Lemmatizes a token.default String
lemmatize(@NonNull String string)
Determines the best lemma for a stringdefault String
lemmatize(@NonNull String string, @NonNull PartOfSpeech partOfSpeech)
Determines the best lemma for a string given a part of speech
-
-
-
Method Detail
-
lemmatize
default String lemmatize(@NonNull @NonNull String string)
Determines the best lemma for a string- Parameters:
string
- the string to lemmatize- Returns:
- the lemmatized version of the string
-
lemmatize
default String lemmatize(@NonNull @NonNull String string, @NonNull @NonNull PartOfSpeech partOfSpeech)
Determines the best lemma for a string given a part of speech- Parameters:
string
- the stringpartOfSpeech
- the part of speech- Returns:
- the lemmatized version of the string
-
allPossibleLemmas
List<String> allPossibleLemmas(String string, PartOfSpeech partOfSpeech)
Gets all lemmas.- Parameters:
string
- the stringpartOfSpeech
- the part of speech- Returns:
- the all lemmas
-
allPossibleLemmasAndPrefixes
Trie<String> allPossibleLemmasAndPrefixes(String string, PartOfSpeech partOfSpeech)
Gets prefixed lemmas.- Parameters:
string
- the stringpartOfSpeech
- the part of speech- Returns:
- the prefixed lemmas
-
canLemmatize
boolean canLemmatize(String input, PartOfSpeech partOfSpeech)
Can lemmatize boolean.- Parameters:
input
- the inputpartOfSpeech
- the part of speech- Returns:
- the boolean
-
-