Segmenter.Base.Collectors.FrequencyDictionary.SortByPower C# (CSharp) Method

SortByPower() public method

The sort by power.
public SortByPower ( ) : List>>.List
return List>>.List
        public List<KeyValuePair<string, List<int>>> SortByPower()
        {
            var list = new List<KeyValuePair<string, List<int>>>(words);
            list.Sort((firstPair, nextPair) => firstPair.Value.Count.CompareTo(nextPair.Value.Count));

            list.Reverse();
            return list;
        }