Final Course Project: N-Gram Word Prediction using ANLP library

Hassan Rabie
09/10/2016

Introduction

The goal of this application is to create a model to predict next word from data files that have collected from: Blogs, News and Twitter files.

The assignment is to build a shiny application where the user can enter a statement in an input text and the next word will will appeared in anther one.

The application can be accessed by clicking on the following link: Click Here

Model Building

To build the predictive model

  • Downloading the data
  • Working on a sample from the data (1%)
  • Build the predictive Model Using ANLP library to
    (1)Cleaning the data using, cleanTextData function
    (2)Generating N-gram models using generateTDM function. i generate 5 ngram models
    (3)consulidate the 5 models in one Ngram model list
  • Predict the next word using predict_Backoff

Code of Model and Shiny Application

(1)Exploratory Data Analysis Data Here

(2)Generating Ngaram Models, Here

(3) Shiny Application ui.R file, Here

(4) Shiny Application Server.R file, Here

(5) The Shiny Application, Here

Thank You