Class Lexeme
java.lang.Object
org.episteme.social.linguistics.Lexeme
- All Implemented Interfaces:
Serializable
Represents a lexeme—an abstract unit of the lexicon in a language that
encompasses all inflected forms of a single word. For example, the lexeme
'run' includes the forms 'run', 'runs', 'ran', and 'running'.
* @version 2.0
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an inflected form to the lexeme.booleangetForms()inthashCode()voidsetCanonicalForm(String canonicalForm) voidsetDefinition(String definition) voidtoString()
-
Constructor Details
-
Lexeme
-
Lexeme
Constructs a lexeme from an existing set of word forms.- Parameters:
forms- list of word forms belonging to this lexeme- Throws:
IllegalArgumentException- if forms is null or empty
-
-
Method Details
-
getLanguage
- Returns:
- the primary language associated with this lexeme
-
getForms
-
addForm
Adds an inflected form to the lexeme.- Parameters:
form- the word form to add
-
getCanonicalForm
- Returns:
- the lemma or base form of the lexeme
-
setCanonicalForm
-
getPartOfSpeech
-
setPartOfSpeech
-
getDefinition
-
setDefinition
-
equals
-
hashCode
-
toString
-