com.languagecomputer.api.query
Interface Answer

All Superinterfaces:
Text
All Known Implementing Classes:
DefaultAnswer

public interface Answer
extends Text

Representation of an answer to a Query.

Since:
1.0
Author:
Kirk Roberts

Field Summary
static AnnotationType<Answer> TYPE
           
 
Method Summary
 double getConfidence()
          Returns the confidence of this Answer in the range of (0.0-1.0] (optional).
 String getPassage()
          Returns the passage context of this Answer.
 
Methods inherited from interface com.languagecomputer.api.text.Text
getAnnotationType, getCongruentAnnotations, getDocument, getDocumentID, getEndCharOffset, getIntersectingAnnotations, getRawString, getStartCharOffset, getSubAnnotations, getSuperAnnotations
 

Field Detail

TYPE

static final AnnotationType<Answer> TYPE
Method Detail

getConfidence

double getConfidence()
Returns the confidence of this Answer in the range of (0.0-1.0] (optional). Confidence can be considered as relevance, score, or any other metric used to rank answers.

Returns:
The confidence/weight/relevance/score of this Answer.

getPassage

String getPassage()
Returns the passage context of this Answer. For passage-style answers, this may either be equal to the Text.getRawString() or have even more context. For exact-style answers, getRawString returns the exact answer while this method returns the context.



Copyright © 2009. All Rights Reserved.