文件名称:FindwordCnt
介绍说明--下载内容均来自于网络,请自行研究使用
1 .工作从控制台读取文本文件的名称。
2。在文本文件中逐行读取。
3。把每一行分成单词,丢弃标点,把所有的字母都折叠进去小写。
4。存储唯一的单词并保持对每个不同单词的计数。
5。首先通过减少计数,如果有多个单词,相同的数,按字母顺序。
6。在已排序的列表中输出前十个单词,以及它们的计数。
7。在列表中输出最后十个单词,以及它们的计数。(1. Read the name of the text file from the console.
2. Read in a text file, line by line.
3. Split each line into words, discarding punctuation and folding all letters into
lower case.
4. Store the unique words and maintain a count of each different word.
5. Sort the words first by decreasing count and, if there are multiple words with
the same count, alphabetically.
6. Output the first ten words in the sorted list, along with their counts.
7. Output the last ten words in the list, along with their counts.)
2。在文本文件中逐行读取。
3。把每一行分成单词,丢弃标点,把所有的字母都折叠进去小写。
4。存储唯一的单词并保持对每个不同单词的计数。
5。首先通过减少计数,如果有多个单词,相同的数,按字母顺序。
6。在已排序的列表中输出前十个单词,以及它们的计数。
7。在列表中输出最后十个单词,以及它们的计数。(1. Read the name of the text file from the console.
2. Read in a text file, line by line.
3. Split each line into words, discarding punctuation and folding all letters into
lower case.
4. Store the unique words and maintain a count of each different word.
5. Sort the words first by decreasing count and, if there are multiple words with
the same count, alphabetically.
6. Output the first ten words in the sorted list, along with their counts.
7. Output the last ten words in the list, along with their counts.)
相关搜索: 查找文件出现最多的单词
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Ass1
Ass1\.cproject
Ass1\.project
Ass1\.settings
Ass1\.settings\org.eclipse.cdt.managedbuilder.core.prefs
Ass1\ass1.cpp
Ass1\correct.txt
Ass1\Debug
Ass1\Debug\Ass1.exe
Ass1\Debug\ass1.o
Ass1\t.txt
Ass1\test.txt
Ass1\.cproject
Ass1\.project
Ass1\.settings
Ass1\.settings\org.eclipse.cdt.managedbuilder.core.prefs
Ass1\ass1.cpp
Ass1\correct.txt
Ass1\Debug
Ass1\Debug\Ass1.exe
Ass1\Debug\ass1.o
Ass1\t.txt
Ass1\test.txt