next up previous
Next: Check those lists Up: Assignment 10: Tables Previous: Assignment 10: Tables

Count them words

Goal: Find the 20 most common words in our wondrous textbook.

  1. Type in the code from the book that uses the built-in Hashtable to count word frequencies.
  2. Download the text of the book from

    http://rocky.wellesley.edu/cs230/code/hw10/text.txt
  3. Think about how to handle punctuation and any other wierdness that appears in the file.
  4. How many different words are there?
  5. Think about how to find the 20 most common. Hint: is there another data structure that might help?



Allen Downey
Mon Nov 13 09:42:26 EST 2000