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 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 Type
    Method
    Description
    int
    Returns the character index of the beginning of this sentence in the user input text.
    int
    Returns the index of the character right after the end of this sentence in the user input text.
    Returns the original text of this sentence.
    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 Details

    • 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 is null
    • 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. An InputProcessor may add / modify / delete entries.

      Instances of WordDataI must be created with method InputProcessor.createWordData(java.lang.String, int) (to be called from an input processor) and InputProcessorChain.createWordData(java.lang.String, int) (to be called from outside of an input processor).