SwiftKey Next Word Prediction

Johns Hopkins Data Science Capstone

Author: Yash Gautam

Objective

Develop a predictive text application that predicts the next word using n-gram language models.

Dataset Overview

Data Sources

  • Blogs
  • News
  • Twitter

Dataset Summary

  • More than 4 million text entries
  • Over 100 million words
  • English language dataset
  • Used for predictive text modeling

Prediction Algorithm

Method

  • Convert text to lowercase
  • Remove punctuation
  • Remove numbers
  • Remove extra spaces
  • Build unigram, bigram and trigram models
  • Use a backoff strategy to predict the next word

Shiny Application

Conclusion

Summary

  • Interactive next-word prediction application
  • Built using R and Shiny
  • Successfully deployed online

Future Improvements

  • Improve prediction accuracy
  • Use larger datasets
  • Support multiple suggestions

Thank You