Answering questions from a long text passage
In the previous recipe, we learned an approach to extract the answer to a question, given a context. This pattern involves the model retrieving the answer from the given context. The model cannot answer a question that is not contained in the context. This does serve a purpose where we want an answer from a given context. This type of question-answering system is defined as Closed Domain Question Answering (CDQA).
There is another system of question answering that can answer questions that are general in nature. These systems are trained on larger corpora. This training provides them with the ability to answer questions that are open in nature. These systems are called Open Domain Question Answering (ODQA) systems.
Getting ready
As part of this recipe, we will use the DeepPavlov (https://deeppavlov.ai) ODQA system to answer an open question. We will use the deeppavlov
library along with the Knowledge Base Question Answering (KBQA...