Back to Tensorflow

QuestionAnswerer

tensorflow/lite/g3doc/api_docs/java/org/tensorflow/lite/task/text/qa/QuestionAnswerer.html

2.21.01.6 KB
Original Source

public interface QuestionAnswerer

| Known Indirect Subclasses

BertQuestionAnswerer

| BertQuestionAnswerer | Returns the most possible answers on a given question for QA models (BERT, Albert, etc.). |

|

API to answer questions based on context.

Public Methods

| abstract List<QaAnswer> | answer(String context, String question) Answers question based on context, and returns a list of possible QaAnswers.

|

Public Methods

public abstract List<QaAnswer> answer (String context, String question)

Answers question based on context, and returns a list of possible QaAnswers. Could be empty if no answer was found from the given context.

Parameters

| context | context the question bases on | | question | question to ask |

Returns
  • a list of possible answers in QaAnswer