Interface AnalysisToken


@Incubating public interface AnalysisToken
Represents a token produced by the analysis.
See Also:
  • Method Details

    • term

      String term()
      Returns:
      The text value of a produced token.
    • startOffset

      int startOffset()
      Returns:
      Starting offset for this token, i.e. the position of the first character in the source text corresponding to this token.

      Note that the difference between the end and the start offsets may differ from the token's length as some filters may have altered the term text.

    • endOffset

      int endOffset()
      Returns:
      Ending offset for this token, i.e. the position of the last character in the source text corresponding to this token.

      Note that the difference between the end and the start offsets may differ from the token's length as some filters may have altered the term text.

    • type

      String type()
      Returns:
      The lexical type of this token.

      Defaults to "word".