Class Text

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

public class Text extends Object implements Serializable
Represents a document or textual passage, composed of a sequence of sentences. Provides analytical utilities for word count and linguistic density. * @version 2.0
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • Text

      public Text()
      Creates an empty Text instance.
    • Text

      public Text(List<Sentence> sentences)
      Creates a text from prepared sentences.
      Parameters:
      sentences - list of sentences
    • Text

      public Text(String rawText)
      Creates a text by parsing raw textual input into constituent sentences.
      Parameters:
      rawText - the source text string
    • Text

      public Text(String rawText, Language language)
      Creates a text with a specified language.
      Parameters:
      rawText - the source text string
      language - the document language
  • Method Details

    • getSentences

      public List<Sentence> getSentences()
    • addSentence

      public void addSentence(Sentence sentence)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getLanguage

      public Language getLanguage()
    • setLanguage

      public void setLanguage(Language language)
    • getWordCount

      public int getWordCount()
      Returns:
      the total count of words in the text
    • getAverageWordsPerSentence

      public double getAverageWordsPerSentence()
      Returns:
      calculation of the average number of words per sentence
    • toString

      public String toString()
      Overrides:
      toString in class Object