public static class ClassifierTagger.State<F> extends Object
ClassifierTagger.State represents the full list
of input tokens and a list of the tags assigned so far.| Modifier and Type | Method and Description |
|---|---|
int |
numTokens()
Returns the number of tokens in the input.
|
int |
position()
Returns the current position in the input.
|
String |
tag(int pos)
Return the tag at the specified position.
|
List<String> |
tags()
Return an unmodifiable view of the underlying tags.
|
F |
token(int pos)
Return the token at the specified position.
|
List<F> |
tokens()
Return an unmodifiable view of the underlying tokens.
|
public int numTokens()
public int position()
public List<F> tokens()
public List<String> tags()
public F token(int pos)
pos - Position of token.IndexOutOfBoundsException - if the position is out of range
(i.e., less than zero or greater than or equal to the number of
tokens).public String tag(int pos)
pos - Position of tag.IndexOutOfBoundsException - if the position is out of
range for the list of tags (i.e., less than 0 or greater
than the position minus one).Copyright © 2019 Alias-i, Inc.. All rights reserved.