摘要: using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;namespace 英语词频{ public partial class Form1 : Form { public Form1() { InitializeComponent(); ... 阅读全文
posted @ 2013-04-23 16:27 东嘉CEO 阅读(1552) 评论(0) 推荐(0)
摘要: using System; using System.Collections; using System.Linq; using System.Text; using System.IO; using System.Text.RegularExpressions; class getFiles { public static void getWordList(string pathName, ref Hashtable wordList) //getWordList:从文本文件中统计词频保存在Hashtable中 { Strea... 阅读全文
posted @ 2013-04-23 13:40 东嘉CEO 阅读(1203) 评论(0) 推荐(0)
摘要: 性能全部损耗在排序上,由于hashtable不能排序,所以只能借助其他来排序,不过还好一本60000字的书10几秒就能统计完.using System.IO;using System.Collections;//use hashtableusing System.Text.RegularExpressions;namespace WindowsApplication1{ public partial class Form1 : Form {public Form1(){InitializeComponent();}private void cmdStart_Click(object sende 阅读全文
posted @ 2013-04-23 13:33 东嘉CEO 阅读(353) 评论(0) 推荐(0)
摘要: private void textBox1_TextChanged(object sender, EventArgs e) { textBox2.Text = getWordSum(textBox1.Text).ToString(); } private int getWordSum(string text) { string textbasic = text; char[] basictemp = text.ToCharArray(); int ch... 阅读全文
posted @ 2013-04-23 13:29 东嘉CEO 阅读(859) 评论(0) 推荐(0)