- A simple autocompletion system that uses the Brown University corpus to generate suggestions.
- Install Python 3.7 (add to PATH)
- Run
pip3 install -r requirements.txt
- Run
py -3 download_nltk_packages.py
- Run
py -3 create_unigrams.py
to process the Brown University corpus. - Run
py -3 important_unigrams.py
add the most important unigrams to the suggestions. - Run
py -3 important_bigrams.py
thenpy -3 important_trigrams.py
to do the same for bigrams and trigrams. - Run
py -3 create_trie.py
to create the trie of suggestions. - Run
py -3 predict_text.py
to open a tkinter window to try it out.
Type in something and press tab to use a suggestion. You might need to type something specific to the Brown University corpus since the variety of documents is limited.
/data
Where the processed corpus data is saved/graphs
Images of the graphs created byimportant_unigrams.py
,important_bigrams.py
, andimportant_trigrams.py