Coder Social home page Coder Social logo

aoareader's Introduction

AoaReader

This is a simple implementation of paper Attention-over-Attention Neural Networks for Reading Comprehension. We only use CNN news database to train and test the model. Also, the implementation doesn't consist of N-best Re-ranking Strategy in the paper.

About the folder structure

AoaReader
├─
│  .gitignore
│  pre_train.py
│  README.md
│  test.ipynb
│  test.py
│  train.py
│  
├─.vscode
│      settings.json
│      
├─data
│      Readme.md
│      
├─model
│  │  model.py
│  │  __init__.py
│  │  
│  └─__pycache__
│          model.cpython-36.pyc
│          __init__.cpython-36.pyc
│          
├─temp
│      dictionary.pickle
│      Readme.md
│      test_vec.pickle
│      train_vec.pickle
│      valid_vec.pickle
│      
└─utils
    │  dataloader.py
    │  dict.py
    │  __init__.py
    │  
    └─__pycache__
            dataloader.cpython-36.pyc
            dataloader.cpython-38.pyc
            dict.cpython-36.pyc
            dict.cpython-38.pyc
            __init__.cpython-36.pyc
            __init__.cpython-38.pyc
  • AoaReader
    • data : consists of the dataset.
      • cnn : download from here
    • model : consists of the model AoaReader.
      • model.py
    • utils : consists of some tool class the deal with data.
      • dict.py
      • dataloader.py
    • temp : save some temporary files, like the trained model, the prepared data.
    • pre_train.py : deal with the origin data
    • train.py : train the model
    • test.py : predict on the test data with the trained model

How to run

  1. Download the dataset from here.
  2. Run rm ./temp/*.pickle to delete the temp files generate by us. Also, you can choose to use them instead of deleting. (It will save several minutes to deal with the data). Attention, if you choose to use our temp files, you can skip step 1 but you should change some lines in the pre_train.py to stop accessing dataset files.
  3. Run python pre_train.py.
  4. Run python train.py.
  5. Run python test.py.

aoareader's People

Contributors

jennahf avatar xuhwang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.