com.aliasi.classify
Class Classification

java.lang.Object
  extended by com.aliasi.classify.Classification
Direct Known Subclasses:
RankedClassification

public class Classification
extends Object

A Classification provides a first-best category. Subclasses provide n-best results with numerical scores of various interpretations.

Since:
LingPipe2.0
Version:
3.8
Author:
Bob Carpenter

Constructor Summary
Classification(String bestCategory)
          Construct a classification with the specified first-best category.
 
Method Summary
 String bestCategory()
          Returns the best-scoring category.
 String toString()
          Returns a string-based representation of the first-best category of this classification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Classification

public Classification(String bestCategory)
Construct a classification with the specified first-best category.

Parameters:
bestCategory - Category of this classification.
Throws:
IllegalArgumentException - If the category is null.
Method Detail

bestCategory

public String bestCategory()
Returns the best-scoring category.

Returns:
Best category for this classification.

toString

public String toString()
Returns a string-based representation of the first-best category of this classification.

Overrides:
toString in class Object
Returns:
A string-based representation of this classification.