public class TokenFactory extends Object
| Constructor and Description |
|---|
TokenFactory()
Constructor for a new token factory which will add in the word and the
begin/end position annotations.
|
TokenFactory(boolean addOffsets)
Constructor that allows one to choose if index annotation indicating
begin/end position will be included in the token.
|
| Modifier and Type | Method and Description |
|---|---|
Token |
createToken(String tokenString,
int offset,
int length)
Constructs a Token as a String with corresponding offsets and length from
which to calculate start and end position of the Token.
|
public TokenFactory()
public TokenFactory(boolean addOffsets)
addOffsets - if true, offSet annotations will be included (this is the default)public Token createToken(String tokenString, int offset, int length)
tokenString - string to be added to a Token objectoffset - the starting offset of the Tokenlength - of the stringCopyright © 2017 IXA pipes. All rights reserved.