Skip to content

Asks for a word and suggests following words or even sentences. Frequency or Possibility method can be chosen for the suggestion to be made. Training is done by reading txt files in the directory of the program. Then a graph containing every unique word and the words found to follow that word (and how many times are found) is created and used.

Notifications You must be signed in to change notification settings

ThanAid/Word_suggestion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Word Suggestion

.txt files must be put in the directory of the program. A .txt file is provided for testing purposes.

Features

  • Word suggestion based on frequency.

Asks for a word and the number of suggestions you want and then prints the suggested words. Words are suggested based on how many times they are found to follow the given word. If two or more words have the same frequency one of them is chosen randomly.

  • Sentence suggestion based on frequency.

Asks for a word and the number words you want your sentence to have and then for every word the procedure mentioned in the previous mode is executed and the word with the biggest frequency is chosen. Then the sentence gets printed. If two or more words have the same frequency one of them is chosen randomly.

  • Word suggestion based on possibility.

Asks for a word and the number of suggestions you want and then prints the suggested words. Words are suggested based on a random choise selection that uses their possibility ratio. Possibility ratio is calculated based on how many times that word is found to follow the given word. For example if the word "evening" follows the word "good" 4 out of 20 times the word "good" is found then the possibility ratio of the word evening given the word good is 20 %.

  • Sentence suggestion based on possibility.

Asks for a word and the number of words you want your sentence to have and then for every word the procedure mentioned in the previous mode is executed with the number of suggestions being 1. Then the sentence gets printed.

About

Asks for a word and suggests following words or even sentences. Frequency or Possibility method can be chosen for the suggestion to be made. Training is done by reading txt files in the directory of the program. Then a graph containing every unique word and the words found to follow that word (and how many times are found) is created and used.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages