# Hwk8 - CMSC 152001 Intro to Computer Science 2 Summer 2009 Homework#8 Due Date(by class time 1:30 pm Exercise 1 <15 points> Implement the hangman

This preview shows pages 1–2. Sign up to view the full content.

CMSC 15200 Intro to Computer Science 2 Summer 2009 Homework #8 (8/21/2009) Due Date: 8/26/2009 (by class time — 1:30 pm) Exercise 1 <<15 points>> Implement the hangman game (Exercise 4 from Homework # 2, including the extra credit portion ) using Python. Exercise 2 <<20 points>> In language processing, two texts can be compared to determine how similar they are according to multiple criteria. In this exercise, we will simplify the definition of “distance” between two texts, in such a way that it will be possible to compute this distance using a python script. Before computing the distance, we need to generate the following information for each text: . Word frequencies . Given the text, compute the frequency of each word. This should result in a file containing a list of (word,frequency) pairs, which we will denote as w i , f i . You are already provided with several example frequency files for this exercise. Writing a word frequency generator is a separate exercise. . Normalized word frequencies . Given the word frequencies, normalize them. To do this, simply take each frequency and divide it by the square root of the sum of the squares of all the frequencies:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/10/2009 for the course CMSC 15200 taught by Professor Paolocodenotti during the Summer '09 term at UChicago.

### Page1 / 3

Hwk8 - CMSC 152001 Intro to Computer Science 2 Summer 2009 Homework#8 Due Date(by class time 1:30 pm Exercise 1 <15 points> Implement the hangman

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online