|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.classify.Classification
com.aliasi.classify.RankedClassification
public class RankedClassification
A RankedClassification provides a classification with
an ordered n-best list of category results. Subclasses of this
class add scores with various interpretations to the ranked n-best
results.
| Constructor Summary | |
|---|---|
RankedClassification(String[] categories)
Construct a ranked classification with the specified results ordered from best to worst. |
|
| Method Summary | |
|---|---|
String |
category(int rank)
Returns the category with the specified rank in the classification. |
int |
size()
Returns the number of categories in this classification. |
String |
toString()
Returns a string-based representation of this ranked classification. |
| Methods inherited from class com.aliasi.classify.Classification |
|---|
bestCategory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RankedClassification(String[] categories)
null if the
specfied array of categories is empty.
Note that the categories are simply stored as part of this ranked classification, not copied, so any subsequent change to the category array will affect this ranked classification.
categories - Result categories, in order from best to worst.| Method Detail |
|---|
public int size()
public String category(int rank)
rank - Rank of result the category of which is to be returned.
IllegalArgumentException - If the rank is out of range.public String toString()
toString in class Classification
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||