Example #1
0
 public void Initialize()
 {
     _parser = new Parser();
     _sorter = new Sorter();
     _testPath = "../../Resume.txt";
     _dictionary = _parser.ParseFile(_testPath).ToDictionary(t => t.Key, t => t.Value);
 }
Example #2
0
        static void Main(string[] args)
        {
            Parser parser = new Parser();
            Sorter sorter = new Sorter();
            string filePath = "../../../WordCloudAppTests/Summary.txt";
            Dictionary<string, int> dictionary = parser.ParseFile(filePath).ToDictionary(t => t.Key, t => t.Value);
            Dictionary<string, int> wordsUsedTwice = sorter.ThresholdResults(dictionary, 2, 2).ToDictionary(t => t.Key, t => t.Value);
            Dictionary<string, int> topTenWords = sorter.TopResults(dictionary).ToDictionary(t => t.Key, t => t.Value);
            string[] actualTopTenWords = topTenWords.Keys.ToArray();

            Console.WriteLine("The most used word is: " + actualTopTenWords[0]);
            Console.ReadLine();

            sorter = null;
            parser = null;
        }
Example #3
0
 public void Cleanup()
 {
     _parser = null;
     _sorter = null;
     _dictionary = null;
 }
Example #4
0
 public void Initialize()
 {
     _parser = new Parser();
     _testPath1 = "../../Resume.txt";
 }
Example #5
0
 public void Cleanup()
 {
     _parser = null;
 }