Giter Club home page Giter Club logo

word-prediction-with-rnn's Introduction

Word Prediction using Recurrent Neural Networks

About

Word prediction, or language modeling, is the task of predicting the most likely words following the preceding text. It has many applications, such as suggesting the next word as text is entered, as an aid in resolving ambiguity in speech and handwriting recognition, and in machine translation.

Goals

  • Implement a recurrent neural network (RNN) language model
  • Implement an n-gram predictor as a baseline model
  • Compare accuracy of the two methods for different training set sizes
  • Compare time and space complexity and usage of the two algorithms
  • Generate some text using both models for qualitative comparison

Report

The final report is available here (PDF).

Usage

The project will work on a default Amazon EC2 AMI distribution if you'd like a clean slate - the base Python used is the Anaconda3 4.2.0 distribution with Python 3.5.2.

  • Select the micro instance (free tier) and launch with a key pair.
  • Login with username ec2-user
  • Download Anaconda3 - wget https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh
  • Make executable - chmod +x Anaconda3-4.2.0-Linux-x86_64.sh
  • Run installer - ./Anaconda3-4.2.0-Linux-x86_64.sh
  • Add path - source .bashrc
  • Test it - ipython
  • Install git - sudo yum install git

Once you have a Python 3.5 system set up,

  • Clone this repository - git clone https://github.com/goldservice2017/Word-Prediction-with-RNN.git
  • CD into the project - cd Word-Prediction-with-RNN
  • Install Python packages - pip install -r requirements.txt
  • Run make download to download and unzip the GloVe word vectors (~5 minutes)
  • Run make rnn or make ngram to train and test the different models (the RNN is set up to train on 1% of the data for evaluation purposes)
  • Run make plots to show a plot of accuracy vs train amount for ngram and RNN

word-prediction-with-rnn's People

Contributors

goldservice2017 avatar

Stargazers

Salma Hany Farh avatar  avatar  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.