To run the code on your corpus you have to change the filename of you corpus to "corpus.txt" and put both this code and your corpus in the same folder. Simply run the python code and the results will be available in the "Results.txt". First the list of all unigrams and their frequencies and than the list of all bigrams with their frequencies