Return to basic course information.
Assigned: Thursday, 19 September 2013
Due: Thursday, 3 October 2013, 6pm
parse.pl alice30.txt > output
Write a quick program or script that counts word frequencies. For the most frequent 25 words and for the most frequent 25 additional words that start with the letter f (a total of 50 words), print the word, the number of times it occurs, its rank in the overall list of words, the probability of occurrence, and the product of the rank and the probability. Also indicate the total number of words and the total number of unique words that you found. Discuss whether this text satisfies Zipf's Law. Feel free to use other parts of the ranked list of terms.
beta=0.5
. Hint: to
solve this problem you don't need to know the value
of K