Ejemplo n.º 1
0
        private static void Main()
        {
            var    consoleInput = new ConsoleInput();
            string filepath     = @"D:\a\review-case-s21b4\review-case-s21b4\CsvFileOutput\WordFrequency.csv";
            var    csvOutput    = new CsvOutput(filepath);
            var    controller   = new Controller(consoleInput, csvOutput);

            var output          = (List <List <string> >)controller.ReadInput();
            var commentAnalyzer = new Analyzer();
            var wordCount       = commentAnalyzer.CountWordFrequency(output);

            controller.WriteOutput(wordCount);
        }
Ejemplo n.º 2
0
        private static void Main()
        {
            var consoleInput = new ConsoleInput();
            var filepath     = @"D:\a\DummyReviews\DummyReviews\FileOutput\output.csv";
            var csvOutput    = new CsvOutput(filepath);
            var controller   = new Controller(consoleInput, csvOutput);

            Console.WriteLine("----------------------Reading Sender Data----------------------");

            var output          = (List <List <string> >)controller.ReadInput();
            var commentAnalyzer = new Analyzer();
            var wordCount       = commentAnalyzer.CountWordFrequency(output);

            var wordCountList = wordCount.Select(item => new List <string> {
                item.Key, item.Value.ToString()
            }).ToList();

            controller.WriteOutput(wordCountList);
        }