Package com.stbasarab.componets
Class Text
java.lang.Object
com.stbasarab.componets.Text
Represents a collection of sentences derived from a given text.
This class provides methods to construct a text object from a string and retrieve its sentences.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Text
Constructs a Text object from a given string. The string is split into sentences based on punctuation marks followed by whitespace.- Parameters:
text- the string representation of the text
-
-
Method Details
-
getSentences
Retrieves the sentences of the text.- Returns:
- an array of Sentence objects that make up the text
-