Skip to content

CS382 Natural Language Processing Project: Machine Reading Comprehension

License

Notifications You must be signed in to change notification settings

JackieXuu/pytorch-machine-reading-comprehension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloze form QA

Contents

  1. Installation
  2. Preparation
  3. Training
  4. Evaluation

Installation

  1. This is implemented in PyTorch with Python 2.7. The CUDA version is 8.0. You can simply run this script.

    pip install http://download.pytorch.org/whl/cu80/torch-0.1.12.post2-cp27-none-linux_x86_64.whl 

Preparation

  1. Put the given dataset train.txt, dev.txt, test.txt in the data folder.
  2. You can download Glove pretraining embedding here, and put it in the data folder.
  3. Make sure some python packages are installed.

Training

  1. Simply run the following script.

    python train.py
  2. If you want to fine-tune your model. You can run the following script.

    python train.py --resume_model=best_model_nlp.pth

Evaluation

  1. Simply run the following script. This will create a file named result.txt.

    python test.py
    

About

CS382 Natural Language Processing Project: Machine Reading Comprehension

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages