info.ephyra.questionanalysis.atype.classifier
Class TrainedQuestionClassifier

java.lang.Object
  extended by info.ephyra.questionanalysis.atype.QuestionClassifier
      extended by info.ephyra.questionanalysis.atype.classifier.TrainedQuestionClassifier

public class TrainedQuestionClassifier
extends QuestionClassifier

A trained model-based classifier for the answer type of a question.

Version:
2008-02-10
Author:
Justin Betteridge

Field Summary
private  edu.cmu.minorthird.classify.Classifier classifier
           
 
Fields inherited from class info.ephyra.questionanalysis.atype.QuestionClassifier
extractor, isInitialized, languagePair
 
Constructor Summary
TrainedQuestionClassifier()
           
 
Method Summary
 java.util.List<AnswerType> classify(edu.cmu.minorthird.classify.Instance instance)
          Classifies a question, represented by an Instance, in terms of its expected answer type.
 void initialize()
          Initializes the FeatureExtractor.
 
Methods inherited from class info.ephyra.questionanalysis.atype.QuestionClassifier
classifySet, evaluate, getAnswerTypes, getAnswerTypes, getAnswerTypes, getLanguagePair, isInitialized, setInitialized, setLanguagePair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classifier

private edu.cmu.minorthird.classify.Classifier classifier
Constructor Detail

TrainedQuestionClassifier

public TrainedQuestionClassifier()
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Description copied from class: QuestionClassifier
Initializes the FeatureExtractor.

Overrides:
initialize in class QuestionClassifier
Throws:
java.lang.Exception - if one of the required input properties is not defined

classify

public java.util.List<AnswerType> classify(edu.cmu.minorthird.classify.Instance instance)
Description copied from class: QuestionClassifier
Classifies a question, represented by an Instance, in terms of its expected answer type. Multiple AnswerTypes may be returned, ranked by their associated score, or probability of being ccrrect. The source object associated with the Instance that is returned by Instance.getSource() must be the original question, in String form.

Specified by:
classify in class QuestionClassifier
Parameters:
instance - the Instance to be classified.
Returns:
a list of AnswerTypes, ranked by their associated score, or probability of being ccrrect.