Question: Work on the following tasks: 1. Write a Python code that does the following: (a) Read a text file of any kind. The text should

Work on the following tasks: 1. Write a Python code that does the following: (a) Read a text file of any kind. The text should be reasonably long (say, 10,000 words or more). (b) Count the frequencies of characters, and plot a histogram. (c) Count the frequencies of transitions from one character to another. (d) Generate some random text (say, 5,000 characters) that follows the probabilities of transitions obtained above (i.e., use the transition frequencies as a Markov model). 2. Produce a PDF file of your report using LATEX, showing your Python code, the results and any comments/discussions, and submit it to the Assignment page in MyCourses by the deadline. To include program codes in LATEX, use the listings environment discussed this week: http://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!