2026-06-21

Predictive Algorithm

This is a demonstration of a predictive algorithm that will produce a suggested next word from several words input.

How it was created

The application is coded in R. It is trained from data contained in three files.

  • en_US.blogs.txt
  • en_US.news.txt
  • en_US.twitter.txt

These files were used to generate an n-gram file set that is used by the algorithm to make its prediction.

How it works

The user types words into the input box. Then the user presses the Predict button provided. The application will render the most likely next word based on the training from the three files.

Conclusion

This is just a demo program to show capability. For production it would be cleaned up and prepared for distribution along with detailed instructions. It would also be further trained on more datasets to improve accuracy.

Questions