Problem Statement

The goal of this project is to build a text prediction application that predicts the next word based on a given input phrase.
Such models are commonly used in search engines, mobile keyboards, and writing assistants to improve typing efficiency and user experience.

Algorithm Description

This application uses an N-gram language model built from English text data.
The model analyzes word sequences and calculates the most probable next word based on previously observed word patterns.
Higher-order n-grams are prioritized, with back-off to lower-order models when needed.

Application Description

The Shiny application provides a simple text input box where users can enter a phrase consisting of multiple words.
After submitting the input, the application processes the text and displays a predicted next word.
The interface is lightweight, intuitive, and easy to use.

Conclusion

This project demonstrates the practical application of natural language processing techniques using R.
The model successfully predicts the next word based on user input and provides an intuitive interface for interaction.
With larger datasets and optimization, prediction accuracy can be further improved.