首页 > 其他 > 详细

Word frequency analysis

时间:2014-08-10 23:51:20      阅读:444      评论:0      收藏:0      [点我收藏+]

Write a program that reads a file, breaks each line into words, scripts whitespace and punctuation from the words, and converts them to lowercase. Modify the program to print the 20 most frequently-used words in the book.

First I downloaded the e-book ‘ELSIE‘S WINTER TRIP’ in the below dictionary:

  bubuko.com,布布扣                     

 

Scripts:

 

 bubuko.com,布布扣

bubuko.com,布布扣

 

from Thinking in Python

Word frequency analysis,布布扣,bubuko.com

Word frequency analysis

原文:http://www.cnblogs.com/ryansunyu/p/3903443.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!