Skip to content

rndn123/Neuro-Symbolic-QA-Model-on-Scholarly-Articles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BiDAF (Bidirectional Attention Flow)

This repository contains the implementation of the Bidirectional Attention Flow (BiDAF) model for machine reading comprehension and question-answering tasks. The BiDAF model is designed to process context and query to provide precise answers from a given passage.

Repository Structure

  • Bidaf.ipynb: Jupyter Notebook containing the implementation and training workflow for the BiDAF model.
  • Bidaf.py: Python script version of the BiDAF implementation for users who prefer non-notebook environments.
  • Data.zip: Compressed dataset file containing the training and validation data for BiDAF. Unzip this file before running the code.
  • bidafglove_tv.npy: Pre-trained GloVe embeddings used for training the BiDAF model.
  • bidaftrain.pkl: Serialized training dataset in Python pickle format.
  • bidafvalid.pkl: Serialized validation dataset in Python pickle format.

Features

  • Implementation of BiDAF model for question-answering tasks.
  • Utilizes pre-trained GloVe embeddings for word representation.
  • Support for training and validation workflows.
  • Jupyter Notebook for experimentation and Python script for streamlined execution.

Setup and Usage

Prerequisites

  • Python 3.7 or higher
  • Required Python libraries:
    • numpy
    • pandas
    • torch
    • tqdm
    • pickle

Install the dependencies using:

pip install -r requirements.txt

Dataset

  • Unzip the Data.zip file to extract the training and validation datasets.
  • Ensure the .pkl and .npy files are in the same directory as the scripts or notebooks.

Running the Code

  1. For interactive experimentation, open Bidaf.ipynb in Jupyter Notebook:
    jupyter notebook Bidaf.ipynb
  2. For command-line execution, use the Bidaf.py script:
    python Bidaf.py

Results and Evaluation

The model's performance can be evaluated using standard metrics like Exact Match (EM) and F1 score. These scores are calculated on the validation dataset.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published