05/09/2020

Word Prediction App Description

Want to know the predicted next word? Use our new app…

  • Users start to type a sentence, the app predicts next word
  • App uses a subset of data from the three data sources (blogs, twitter & news)
  • App also uses the technology of Swiftkey

Try it now…select it here

How to Use the Word Prediction App

  • Click on the link for the app.
  • Select the news article or twitter data for prediction.
  • Type the word in “Enter text..” section.
  • Use clean and clear option below to check the next word predicted based on datasets.

Data Gathering & Cleansing

  • Merged data from the 3 Data Sources into one data file (Blogs, Twitter & News)
  • Cleansed data including converting to lowercase, stripping white space, and removing punctuation & numbers
  • Created Bigram, Trigram and Quadgram n-grams
  • Extracted term-count tables from the n-grams
  • Sorted in descending order based on frequency
  • Saved n-gram objects

Word Prediction Algorithm & Summary

  • Algoithm checks for the highest-order n-gram (n=4)

  • If n=4 is not found, then checks the next lower-order model (n=3)

  • If n=3 is not found, then the app continues to check (n=2)

  • If n=2 is not found, then the app returns “No Match Found”

  • Code is available on GitHub

  • Further work can include expanding both the number of data sources & number of n-grams Enjoy the app!