Interface SentenceI
- All Superinterfaces:
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 of
words identified in the sentence.
Instances of SentenceI / WordDataI must be created with methods
InputProcessor.createSentence(java.lang.String, int) / InputProcessor.createWordData(java.lang.String, int) (to be called from an input processor),
and InputProcessorChain.createSentence(java.lang.String, int) / InputProcessorChain.createWordData(java.lang.String, int) (to be called from
outside of an input processor).
-
Method Summary
Modifier and TypeMethodDescriptionintReturns the character index of the beginning of this sentence in the user input text.intReturns the index of the character right after the end of this sentence in the user input text.getText()Returns the original text of this sentence.getWords()Returns the words of this sentence.voidsetBeginIndex(int _iBeginIndex) Sets the character index of the beginning of this sentence in the user input text to the given value.voidSets the original text of this sentence to the given value.
-
Method Details
-
getText
String getText()Returns the original text of this sentence. -
setText
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
Returns the words of this sentence. AnInputProcessormay add / modify / delete entries.Instances of
WordDataImust 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).
-