9/11/2020

COURSERA DATA SCIENCE CAPSTONE: FINAL PROJECT

KASSIM MOHAMED 11/09/2020

PREDICTING THE NEXT WORD

INTRODUCTION

Getting the data and utilizing it

  1. A subset of the original data was sampled from the 3 sources (blogs,twitter,news) 2.Data cleaning is done into conversion to lowercase, strip white space, and removing punctuation and numbers.
  2. The corresponding Ngrams are created
  3. The term-count tables are extracted from the N-grams and sorted according to the frequency in descending order.
  4. The N-gram objects are saved as R-compressed files

Prediction Model

  • Compressed data are loaded
  • Input a sequence of words
  • First,quadgram.RData is used if last 3 words are used
  • else, trigram.RData is used if the last 2 words are used in the dataset
  • else, bigram.RData is used if the last used word in the dataset
  • else, word with the highest frequency is returned

Shinny Application

The basic tutorial