Coder Social home page Coder Social logo

keras_mn's Introduction

keras_mn

Memory networks are used for automatic question answering.

The model is trained using story, question, answer triplets and tested using story, question to predict the answer.

Requirements

  • nltk==3.2.3
  • matplotlib==2.0.2
  • Keras==2.0.6
  • numpy==1.12.1

Train/Test data

bAbI Tasks Data 1-20 (v1.2) https://research.fb.com/downloads/babi/

Test result

The model is tested against all 10,000 samples in test data. The first 10 results show that only one mis-prediction happens.

Story Question Answer Prediction
john travelled to the hallway . mary journeyed to the bathroom . where is john ? hallway hallway
daniel went back to the bathroom . john moved to the bedroom . where is mary ? bathroom bedroom
john went to the hallway . sandra journeyed to the kitchen . where is sandra ? kitchen kitchen
sandra travelled to the hallway . john went to the garden . where is sandra ? hallway hallway
sandra went back to the bathroom . sandra moved to the kitchen . where is sandra ? kitchen kitchen
sandra travelled to the kitchen . sandra travelled to the hallway . where is sandra ? hallway hallway
mary went to the bathroom . sandra moved to the garden . where is sandra ? garden garden
sandra travelled to the office . daniel journeyed to the hallway . where is daniel ? hallway hallway
daniel journeyed to the office . john moved to the hallway . where is sandra ? office office
john travelled to the bathroom . john journeyed to the office . where is daniel ? office kitchen

Model plot

License

Released under the MIT license. See LICENSE for details.

keras_mn's People

Contributors

shuuchen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.