Beispiel #1
0
 public void Word_Frequency(string sentences, MyMapNode <string, int> Dictionary)
 {
     string[] words = sentences.Split(' ');
     foreach (var word in words)
     {
         if (Dictionary.Exists(word))
         {
             Dictionary.Add(word, Dictionary.Get(word) + 1);
         }
         else
         {
             Dictionary.Add(word, 1);
         }
     }
 }