Unformatted text preview: sentences += line.count('.') + line.count('!') + line.count('?') # word total count words += len(line.split()) ratio = float(words)/float(sentences) print '%1s %30.2f'% (filename,ratio) Counter('text1.txt') Counter('text2.txt') Counter('text3.txt')...
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