public class PosToken
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
offset
The offset from the beginning of the document.
|
Token |
token
The token.
|
Constructor and Description |
---|
PosToken(TokenizedDocument doc,
Token token,
int offset) |
Modifier and Type | Method and Description |
---|---|
int |
getId()
Return the token id.
|
int |
getLength()
Return the token length.
|
java.lang.String |
getText()
Return the text for the token.
|
java.lang.String |
getTokenName()
Return the token name and length.
|
java.lang.String |
toString()
Returns a string representation of this token.
|
public final Token token
public final int offset
public PosToken(TokenizedDocument doc, Token token, int offset)
public int getId()
public int getLength()
public java.lang.String getTokenName()
public java.lang.String getText()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2016, 2017, 2018, 2019, 2023, 2025 Herve Girod. All Rights Reserved. Documentation and source under the MIT licence