com.languagecomputer.api
Class DefaultQuestionAnsweringMetaService

java.lang.Object
  extended by com.languagecomputer.api.DefaultQuestionAnsweringMetaService
All Implemented Interfaces:
QuestionAnsweringService, Service

public class DefaultQuestionAnsweringMetaService
extends Object
implements QuestionAnsweringService

Meta-QuestionAnsweringService that is implemented in terms of the other question-answering services: QuestionProcessingService, DocumentRetrievalService, AnswerExtractionService, and AnswerFusionService.

Since:
1.0
Author:
Kirk Roberts
See Also:
QuestionProcessingService, DocumentRetrievalService, AnswerExtractionService, AnswerFusionService

Constructor Summary
DefaultQuestionAnsweringMetaService()
           
 
Method Summary
 List<Answer> getAnswers(Query query)
          Finds answers to the given Query (optional operation).
 List<Answer> getAnswers(String question)
          Finds answers to the given question.
 String getName()
          Returns QuestionAnsweringService.
 void setSession(Session session)
          Sets the Session this Service instance is associated with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultQuestionAnsweringMetaService

public DefaultQuestionAnsweringMetaService()
Method Detail

getName

public String getName()
Returns QuestionAnsweringService.

Specified by:
getName in interface Service

setSession

public void setSession(Session session)
Sets the Session this Service instance is associated with. Properties can be retrieved with Session.getProperties().

Specified by:
setSession in interface Service

getAnswers

public List<Answer> getAnswers(String question)
Finds answers to the given question.

Specified by:
getAnswers in interface QuestionAnsweringService
Parameters:
question - The String question to find answers to. Cannot be null.
Returns:
A List of Answers to the question.
See Also:
getAnswers(Query)

getAnswers

public List<Answer> getAnswers(Query query)
Finds answers to the given Query (optional operation). This method may optionally be implemented in order to allow the caller to override specific elements of the Query.

Specified by:
getAnswers in interface QuestionAnsweringService
Parameters:
query - The Query to find answers to. Cannot be null.
Returns:
A List of Answers to the question.
Throws:
IllegalArgumentException - If the Query has no natural language representation.


Copyright © 2009. All Rights Reserved.