Class Word

java.lang.Object
org.episteme.social.linguistics.Word
All Implemented Interfaces:
Serializable

public class Word extends Object implements Serializable
Represents a linguistic word, defined as a sequence of one or more morphemes that form a minimal meaningful unit of language. * @version 2.0
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • Word

      public Word(Language language, String text)
      Creates a simple word consisting of a single morpheme.
      Parameters:
      language - the language of the word
      text - the textual representation
    • Word

      public Word(List<Morpheme> morphemes)
      Creates a complex word from a sequence of morphemes.
      Parameters:
      morphemes - list of morphemes in order
      Throws:
      IllegalArgumentException - if list is empty
  • Method Details

    • getLanguage

      public Language getLanguage()
      Returns:
      the language of this word, derived from its constituent morphemes
    • getMorphemes

      public List<Morpheme> getMorphemes()
    • getPartOfSpeech

      public Word.PartOfSpeech getPartOfSpeech()
    • setPartOfSpeech

      public void setPartOfSpeech(Word.PartOfSpeech pos)
    • getLemma

      public String getLemma()
    • setLemma

      public void setLemma(String lemma)
    • getDefinition

      public String getDefinition()
    • setDefinition

      public void setDefinition(String definition)
    • getString

      public String getString()
      Returns:
      the full textual string of the word
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object