测试项目 博客文章地址:[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] 待测单元…
本周根据杨老师的spec对英语文章词频统计进行了改进 1.需求分析: 对英文文章中的英文单词进行词频统计并按照有大到小的顺序输出, 2.算法思想: (1)构建一个类用于存放英文单词及其出现的次数 class WordAndNum{ public String word; public int num; } (2)从txt中获取字符串 BufferedReader in=new BufferedReader(new FileReader("D:\\test.txt")); String…
# 使用SparkSQL编写wordCount的词频统计 ## word.txt```hello hello scala sparkjava sql html java hellojack jack tom tom you he he sql``` ## spark 代码:```object WordCount { def main(args: Array[String]): Unit = { val spark: SparkSession = SparkSession.builder() .a…