ABB.Swum.Utilities.LibFileLoader.ReadWordCount C# (CSharp) Method

ReadWordCount() public static method

Reads a word count file and parses it into a dictionary. The file is assumed to contain one entry per line, with each entry of the format "[count] [word]". Count must be a non-negative whole number. If the file contains duplicate entries for a given word, only the last entry will be in the dictionary. Words are converted to lower case before being added to the dictionary.
public static ReadWordCount ( string path, bool keepOriginalCasing ) : int>.Dictionary
path string The file to read.
keepOriginalCasing bool If True, words are added to the dictionary in their original case. If False, words are converted to lower case.
return int>.Dictionary
        public static Dictionary<string, int> ReadWordCount(string path, bool keepOriginalCasing)
        {
            return ReadWordCount(path, keepOriginalCasing, (s, i) => true);
        }

Same methods

LibFileLoader::ReadWordCount ( string path ) : int>.Dictionary
LibFileLoader::ReadWordCount ( string path, bool keepOriginalCase, Func includeFunction ) : int>.Dictionary