|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.tag.Tagging<E>
E - Type of tokens in the tagging.public class Tagging<E>
A Tagging<E> represents a first-best assignment of a sequence
of tags to a sequence of tokens of type E.
| Constructor Summary | |
|---|---|
Tagging(List<E> tokens,
List<String> tags)
Construct a tagging with the specified list of tokens and tags. |
|
| Method Summary | |
|---|---|
int |
size()
Returns the number of tokens and tags in this tagging. |
String |
tag(int n)
Return the tag in the specified position for this tagging. |
List<String> |
tags()
Return an immutable list of tags for this tagging. |
E |
token(int n)
Return the token in the specified position for this tagging. |
List<E> |
tokens()
Return an immutable view of the tokens for this tagging. |
String |
toString()
Return a string-based representation of this tagging. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Tagging(List<E> tokens,
List<String> tags)
tokens - List of tokens for the tagging.tags - List of tags for the tagging.
IllegalArgumentException - If the lists are not of the
same size.| Method Detail |
|---|
public int size()
public E token(int n)
n - Position of token.
IndexOutOfBoundsException - If the position is out of
range (n < 0 || n >= size()).public String tag(int n)
n - Position of tag.
IndexOutOfBoundsException - If the position is out of
range (n < 0 || n >= size()).public List<E> tokens()
public List<String> tags()
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||