This is done as part of Python course at Linköping University.
The repository contains a command line script to read the file and print basic information abou the content such as frequency table f alphabetic letters, number of words that text contains according to some definition of word, Unique words in text, 5 most commonly used words etc.
The code also writes the about information to a text file according based on a flag.
The second script, generate_scipt.py which takes a filename of a text file, starting word and number of words as inputs and generates a text where the rule is 'the likelihood of the next word' is obtained from text file and most likely word is appended.