public class TokenProperty<T> extends Object
Token that a LanguageParser or
Handler may enhance a token with. Most of these are made available
for use words, but it is up to the parser or handler
to decide when they are used.| Modifier and Type | Field and Description |
|---|---|
static TokenProperty<String> |
EXTENDED_TYPE
Extended type for use with
TokenType.SPECIAL. |
static TokenProperty<String> |
LEMMA
Lemma of the token.
|
static TokenProperty<String> |
NORMALIZED
Normalized form of the token.
|
static TokenProperty<String> |
POS
The part of speech the token is.
|
| Modifier and Type | Method and Description |
|---|---|
T |
cast(Object data)
Cast an object to the data type of this token.
|
static <T> TokenProperty<T> |
define(String id,
Class<T> dataType)
Define some data that can be attacted to a
Token. |
boolean |
equals(Object obj) |
String |
getId() |
int |
hashCode() |
String |
toString() |
public static final TokenProperty<String> NORMALIZED
public static final TokenProperty<String> LEMMA
public static final TokenProperty<String> POS
public static final TokenProperty<String> EXTENDED_TYPE
TokenType.SPECIAL.public static <T> TokenProperty<T> define(String id, Class<T> dataType)
Token.id - dataType - public String getId()
public T cast(Object data)
data - Copyright © 2018. All rights reserved.