This preview shows page 1. Sign up to view the full content.
Unformatted text preview: lines = lines + 1 words = words + len(line.split()) for token in line.split(): #separates words with a new line types[token] = types.get(token,0) + 1 #counts tokens print words print len(types)...
View Full Document
This note was uploaded on 09/06/2009 for the course LING 571 taught by Professor Staff during the Fall '08 term at San Diego State.
- Fall '08