???C#????MapReduce
???????????? ???????[ 2015/5/25 11:24:13 ] ???????????????
????MapReduce??????????????????????????C#???????????MapReduce????????
?????????
????????
????Map???
????Reduce???
??????????
???????
????????
????????????????С????Boss??????????????????????е??????????????????????????????????£?
const string hamlet = @"Though yet of Hamlet our dear brother's death
The memory be green?? and that it us befitted
To bear our hearts in grief and our whole kingdom
To be contracted in one brow of woe??
Yet so far hath discretion fought with nature
That we with wisest sorrow think on him??
Together with remembrance of ourselves.
Therefore our sometime sister?? now our queen??
The imperial jointress to this warlike state??
Have we?? as 'twere with a defeated joy??--
With an auspicious and a dropping eye??
With mirth in funeral and with dirge in marriage??
In equal scale weighing delight and dole??--
Taken to wife: nor have we herein barr'd
Your better wisdoms?? which have freely gone
With this affair along. For all?? our thanks.
Now follows?? that you know?? young Fortinbras??
Holding a weak supposal of our worth??
Or thinking by our late dear brother's death
Our state to be disjoint and out of frame??
Colleagued with the dream of his advantage??
He hath not fail'd to pester us with message??
Importing the surrender of those lands
Lost by his father?? with all bonds of law??
To our most valiant brother. So much for him.
Now for ourself and for this time of meeting:
Thus much the business is: we have here writ
To Norway?? uncle of young Fortinbras??--
Who?? impotent and bed-rid?? scarcely hears
Of this his nephew's purpose??--to suppress
His further gait herein; in that the levies??
The lists and full proportions?? are all made
Out of his subject: and we here dispatch
You?? good Cornelius?? and you?? Voltimand??
For bearers of this greeting to old Norway;
Giving to you no further personal power
To business with the king?? more than the scope
Of these delated articles allow.
Farewell?? and let your haste commend your duty.";
????С????????????????????????
????var content = hamlet.Split(new[] { " "?? Environment.NewLine }?? StringSplitOptions.RemoveEmptyEntries);
????var wordcount=new Dictionary<string??int>();
????foreach (var item in content)
????{
????if (wordcount.ContainsKey(item))
????wordcount[item] += 1;
????else
????wordcount.Add(item?? 1);
????}
???????????????????С???????????г??????????????????С?????????????????????????裺???????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11