GetNextWord is an application that predicts a word that follows the phrase you enter. For example, if you enter "thank you for your", you get a word "support". It is because the underlying corpus has 804 elements that contain the 4-gram phrase, "thank you for your". GetNextWord then creates a 5-gram table where first four words are "thank you for your" and finds a word that appears most frequently after that 4-word phrase. In this case, that word is "support" which appears after the pharse "thank you for your" 146 times. If the corpus does not contain the exact phrase entered, GetNextWord will then looks for the phrase "you for your" instead of "thank you for your", and finds the word that appears most frequently after that 3-word phrase in the 4-gram table. GetNextWord will continue this process until it finds the phrase or word in the corpus that matches some part of the phrase entered. In this example, the 2-word phrase to look for is "for your" and then the last word is "your".
This application works as well as the corpus it uses. In this version, GetNextWord uses a corpus that combines the Twitter corpus (30.1 million words - 167.1MB) and the news corpus (34.8 million words - 205.8MB).