com.aliasi.tag
Class ScoredTagging<E>
java.lang.Object
com.aliasi.tag.Tagging<E>
com.aliasi.tag.ScoredTagging<E>
- Type Parameters:
E - Type of tokens in the tagging.
- All Implemented Interfaces:
- Scored
public class ScoredTagging<E>
- extends Tagging<E>
- implements Scored
A ScoredTagging<E> represents a tagging of
type E along with a real-valued score.
- Since:
- LingPipe3.9
- Version:
- 3.9
- Author:
- Bob Carpenter
|
Constructor Summary |
ScoredTagging(List<E> tokens,
List<String> tags,
double score)
Construct a scored tagging with the specified tokens, tags, and
score. |
|
Method Summary |
double |
score()
Return the score for this tagging. |
String |
toString()
Returns a string-based representation of this scored tagging. |
ScoredTagging
public ScoredTagging(List<E> tokens,
List<String> tags,
double score)
- Construct a scored tagging with the specified tokens, tags, and
score. The token and tag lists are copied so that subsequent
changes to the list will not affect the constructed tagging.
- Parameters:
tokens - Tokens for the tagging.tags - Tags for the tagging.score - Score for the tagging.
- Throws:
IllegalArgumentException - If the lists are not of the
same size.
score
public double score()
- Return the score for this tagging.
- Specified by:
score in interface Scored
- Returns:
- Score for this tagging.
toString
public String toString()
- Returns a string-based representation of this scored tagging.
- Overrides:
toString in class Tagging<E>
- Returns:
- String-based representation of this scored tagging.