private static Dictionary<string, double> PrepareFrequency(string[] words)
{
Dictionary<string, double> table = new Dictionary<string, double>();
foreach (string word in words)
{
if (table.ContainsKey(word))
table[word]++;
else
table.Add(word, 1);
}
return table;
}