Skip to content

MarcelloCeresini/QuestionAnswering

Repository files navigation

QuestionAnswering

This repository contains the code for the Final Project of the Natural Language Processing course in the Artificial Intelligence master degree at UniBo.

The objective of the project is to create an NLP system that solves the problem of Question Answering on the SQuAD dataset. The project has been extended for Open Domain Question Answering, with an additional module (DPR) for a 3 CFU Project Work for the same course.

Quick start

Clone the repository, create a virtual environment and install the requirements provided in requirements.txt.

python3 -m venv .env # or conda create -n NLP python3

Then, once the environment is active:

python3 -m pip install -r requirements.txt

Our normal model's weights can be downloaded from here, while the BERT model's weights can be downloaded from here. They must be placed in src/checkpoints. The DPR module's weights can be downloaded here and must be placed in src/checkpoints/training_dpr.

Another important step is to download SpaCy's english language model:

python3 -m spacy download en_core_web_sm

Then, the model can be evaluated on a test dataset using python3 compute_answers.py *PATH_TO_TEST_JSON_FILE*.

Organization of the repository

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •