Class Text
java.lang.Object
org.episteme.social.linguistics.Text
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionText()Creates an empty Text instance.Creates a text by parsing raw textual input into constituent sentences.Creates a text with a specified language.Creates a text from prepared sentences. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSentence(Sentence sentence) doublegetTitle()intvoidsetLanguage(Language language) voidtoString()
-
Constructor Details
-
Text
public Text()Creates an empty Text instance. -
Text
-
Text
Creates a text by parsing raw textual input into constituent sentences.- Parameters:
rawText- the source text string
-
Text
-
-
Method Details
-
getSentences
-
addSentence
-
getTitle
-
setTitle
-
getLanguage
-
setLanguage
-
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
-