Constructor and Description |
---|
TokenBase(int wordId,
String surface,
ViterbiNode.Type type,
int position,
Dictionary dictionary) |
Modifier and Type | Method and Description |
---|---|
String |
getAllFeatures()
Gets all features for this token as a comma-separated String
|
String[] |
getAllFeaturesArray()
Gets all features for this token as a String array
|
protected String |
getFeature(int feature)
Gets a numbered feature for this token
|
int |
getPosition()
Gets the position/start index where this token is found in the input text
|
String |
getSurface()
Gets the surface form of this token (表層形)
|
boolean |
isKnown()
Predicate indicating whether this token is known (contained in the standard dictionary)
|
boolean |
isUser()
Predicate indicating whether this token is included is from the user dictionary
If a token is contained both in the user dictionary and standard dictionary, this method will return true
|
String |
toString() |
public TokenBase(int wordId, String surface, ViterbiNode.Type type, int position, Dictionary dictionary)
public String getSurface()
public boolean isKnown()
public boolean isUser()
If a token is contained both in the user dictionary and standard dictionary, this method will return true
public int getPosition()
public String getAllFeatures()
public String[] getAllFeaturesArray()
protected String getFeature(int feature)
feature
- feature numberCopyright © 2020. All rights reserved.