Machine Reading Comprehension (MRC)

This API will help you extract responses for the questions posed on input text

Overview

Machine Reading Comprehension (MRC) API is used where the task is to read and comprehend a given text passage, and then answer questions based on it.

This can be used to search given answers in a given text in a semantic way. This helps curate the knowledge base of questions and responses from the inputted text.

Input Type Supported: Text

post
Metadata

https://api.marsview.ai/v1/nlp/mrc
This method is used to fetch specific Metadata for a particular file_id. It can also be used for long polling to track the progress of compute under the status object.
Request
Response
Request
Headers
Content-Type
optional
string
application/json
appId
optional
string
<sample-app-id>
appSecret
optional
string
<sample-app-secret>
Body Parameters
data.questions
optional
array
List of strings (questions)
data.text
optional
boolean
Raw text string on which topics have to be extracted
Response
200: OK
The output consists of two objects. The data object returns the requested metadata if it is computed. The status object shows the current state of the requested metadata. Response string will be "" when there is no ideal response for the question from the given context.
COMPLETED STATE
COMPLETED STATE
{
"data":{
"question_responses":[
...
{
"question":"What is Machine Learning?",
"response":"Machine learning (ML) is the study of computer algorithms that improve automatically through experience."
"start_char":1224,
"end_char":1235
},
{
"question":"How far is the moon?",
"response":"384,400 km"
"start_char":2340,
"end_char":2345,
},
{
"question":"Who finished on the podium?",
"response":""
"start_char":2340,
"end_char":2345,
},
...
]
}
}

Response Object Fields

Fields

Description

question_responses

List of global topics extracted from the audio/video file

response

Text of the extracted topic relevant to the question

question

Question from the list of questions sent in the request

start_char

Starting character location in the original text

end_char

Ending character location in the original text