gov.sandia.cognition.text.token
Interface Token

All Superinterfaces:
OccurrenceInText<Term>, Termable, TermOccurrence
All Known Implementing Classes:
DefaultToken

public interface Token
extends TermOccurrence

Interface for a meaningful chunk of text, called a token.

Since:
3.0
Author:
Justin Basilico

Method Summary
 DefaultTerm asTerm()
          Tokens always are treated as DefaultTerm objects that contain the text of the Token.
 String getText()
          Gets the text of the token.
 
Methods inherited from interface gov.sandia.cognition.text.term.TermOccurrence
getTerm
 
Methods inherited from interface gov.sandia.cognition.text.OccurrenceInText
getData, getLength, getStart
 

Method Detail

getText

String getText()
Gets the text of the token.

Returns:
The text of the token.

asTerm

DefaultTerm asTerm()
Tokens always are treated as DefaultTerm objects that contain the text of the Token.

Specified by:
asTerm in interface Termable
Returns:
A DefaultTerm containing the text of the token.