Class Sentence

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

public class Sentence extends Object implements Serializable
Represents a sentence, a sequence of phrases or words that expresses a complete thought or proposition. It contains grammatical metadata about its purpose and structure. * @version 2.0
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • Sentence

      public Sentence()
      Creates an empty sentence.
    • Sentence

      public Sentence(List<Phrase> phrases)
      Creates a sentence from existing phrases.
      Parameters:
      phrases - list of phrases to assemble
    • Sentence

      public Sentence(String text)
      Creates a sentence from raw textual input and attempts to detect its purpose.
      Parameters:
      text - raw sentence text
  • Method Details

    • getPhrases

      public List<Phrase> getPhrases()
    • addPhrase

      public void addPhrase(Phrase phrase)
    • getStructure

      public Sentence.Structure getStructure()
    • setStructure

      public void setStructure(Sentence.Structure structure)
    • getPurpose

      public Sentence.Purpose getPurpose()
    • setPurpose

      public void setPurpose(Sentence.Purpose purpose)
    • setText

      public void setText(String text)
      Sets the raw text of the sentence and detects its purpose.
      Parameters:
      text - the raw text
    • getWordCount

      public int getWordCount()
      Estimates word count from raw text or constituent phrases.
      Returns:
      count of words
    • toString

      public String toString()
      Overrides:
      toString in class Object