Valid Accept Types: For CSV files (.csv), use: For Excel Files 2003-2007 (.xls), use: For Excel Files 2010 (.xlsx), use: For Text Files (.txt) use: Fo ...
分类:
其他好文 时间:
2017-09-29 12:43:50
阅读次数:
276
可以下载一长篇的英文小说,进行词频的分析。 1.读入待分析的字符串 2.分解提取单词 3.计数字典 4.排除语法型词汇 5.排序 6.输出TOP(20) fo=open('text.txt','r') s=fo.read()#一次性读取文件全部内容 fo.close() s=s.lower() fo ...
分类:
其他好文 时间:
2017-09-27 20:56:46
阅读次数:
141
可以下载一长篇的英文小说,进行词频的分析。 1.读入待分析的字符串 2.分解提取单词 3.计数字典 4.排除语法型词汇 5.排序 6.输出TOP(20) fo = open('C:\\Users\\CANDY\\Desktop\\a.txt','r')news = fo.read()fo.close ...
分类:
其他好文 时间:
2017-09-27 19:08:56
阅读次数:
193
/** * 合并任意个数组 * @param first * @param rest * @param * @return */ public static T[] concat(T[] first, T[]... rest) { int totalLength = first.length; fo... ...
分类:
编程语言 时间:
2017-09-26 23:29:08
阅读次数:
214
1.读入待分析的字符串 2.分解提取单词 3.计数字典 4.排除语法型词汇 5.排序 6.输出TOP(20) fo=open('xiaoliang.txt','r') song=fo.read() exc={'the','a','to','of','and','in','that','on',''} ...
分类:
其他好文 时间:
2017-09-26 22:29:22
阅读次数:
151
>>> fo.open('coffee.txt','r')coffee=fo.read()coffee=coffee.lower()for i in ',.': coffee=coffee.replace(i,' ')words=coffee.split(' ')exp={'','the','a', ...
分类:
其他好文 时间:
2017-09-26 10:05:56
阅读次数:
166
1.读入待分析的字符串 代码如下: 结果: 2.分解提取单词 代码如下: 运行结果: 3.计数字典 代码如下: 运行结果: 4.排除语法型词汇 代码如下: 运行结果: 5.排序 代码如下: 运行结果: 6.输出TOP(20) 代码如下: 总代码如下: fo=open('text.txt','w')f ...
分类:
其他好文 时间:
2017-09-26 10:05:02
阅读次数:
226
class Solution { public void rotate(int[][] matrix) { int n=matrix.length; for(int i=0;i<n;i++) for(int j=i+1;j<n;j++) swap(matrix,i,j,j,i); fo... ...
分类:
其他好文 时间:
2017-09-25 09:47:54
阅读次数:
97
The code base version is an integer start from 1 to n. One day, someone committed a bad version in the code case, so it caused this version and the fo ...
分类:
其他好文 时间:
2017-09-23 10:42:54
阅读次数:
115
141. Linked List Cycle 141. Linked List Cycle 141. Linked List Cycle 141. Linked List Cycle Given a linked list, determine if it has a cycle in it. Fo ...
分类:
其他好文 时间:
2017-09-21 17:50:10
阅读次数:
111