Interface SentenceI
-
- All Superinterfaces:
Serializable
public interface SentenceI extends Serializable
This interface represents a sentence identified in the user input text. It provides access to the sentence text, its start position in the user input text, and the list ofwords
identified in the sentence.Instances of
SentenceI
/WordDataI
must be created with methodsInputProcessor.createSentence(java.lang.String, int)
/InputProcessor.createWordData(java.lang.String, int)
(to be called from an input processor), andInputProcessorChain.createSentence(java.lang.String, int)
/InputProcessorChain.createWordData(java.lang.String, int)
(to be called from outside of an input processor).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getBeginIndex()
Returns the character index of the beginning of this sentence in the user input text.int
getEndIndex()
Returns the index of the character right after the end of this sentence in the user input text.String
getText()
Returns the original text of this sentence.List<WordDataI>
getWords()
Returns the words of this sentence.void
setBeginIndex(int _iBeginIndex)
Sets the character index of the beginning of this sentence in the user input text to the given value.void
setText(String _sText)
Sets the original text of this sentence to the given value.
-
-
-
Method Detail
-
getText
String getText()
Returns the original text of this sentence.
-
setText
void setText(String _sText)
Sets the original text of this sentence to the given value.- Throws:
IllegalArgumentException
- if the given argument isnull
-
getBeginIndex
int getBeginIndex()
Returns the character index of the beginning of this sentence in the user input text.
-
setBeginIndex
void setBeginIndex(int _iBeginIndex)
Sets the character index of the beginning of this sentence in the user input text to the given value.- Throws:
IllegalArgumentException
- if the given value is negative
-
getEndIndex
int getEndIndex()
Returns the index of the character right after the end of this sentence in the user input text.
-
getWords
List<WordDataI> getWords()
Returns the words of this sentence. AnInputProcessor
may add / modify / delete entries.Instances of
WordDataI
must be created with methodInputProcessor.createWordData(java.lang.String, int)
(to be called from an input processor) andInputProcessorChain.createWordData(java.lang.String, int)
(to be called from outside of an input processor).
-
-