#瓦登尔湖词频统计: import string path = 'D:/python3/Walden.txt' with open(path,'r',encoding= 'utf-8') as text: words = [raw_word.strip(string.punctuation).lower() for raw_word in text.read().split()] words_index = set(words) counts_dict = {index:words.count(…
这里将用c#写一个关于词频统计的命令行程序. 预计时间分配:输入处理3h.词条排序打印2h.测试3h. 实际时间分配:输入处理1h.词条排序打印2h.测试3h.程序改进优化6h. 下面将讲解程序的完成过程: 首先是输入处理部分,我们需要递归地扫描文章中的单词,首先此程序中单词的定义如下: A word: a string with at least 3 English alphabet letters, then followed by optional alphanumerical chara…
测试项目 博客文章地址:[http://www.cnblogs.com/jx8zjs/p/5862269.html] 工程地址:https://coding.net/u/jx8zjs/p/wordCount/git ssh://git@git.coding.net:jx8zjs/wordCount.git 测试用例: 1. My English is very very pool 2.地址 [http://www.gutenberg.org/files/2600/2600-0.txt] 待测单元…