예제 #1
0
        static void Main(string[] args)
        {
            var blackList = StopWords.ReadBlackListWords();

            if (args.Length == 0)
            {
                args = new string[] { "" };
            }

            var inputString = UIInput.ProcessInput(args[0]);

            var splitList = Splitter.SplitString(inputString);

            var cleansedList = StopWords.ReturnCleansedString(blackList, splitList);

            var allWords = CountStrings.StringsCountFromList(cleansedList);

            var uniqueWords = CountStrings.UniqueStringsCountFromList(cleansedList);

            var averageDigitsPerWord = CountStrings.AverageNumberOfDigitsPerWord(cleansedList, allWords);

            var testFuncPointer = CountStrings.ReturnAverage(CountStrings.FuncPointer, cleansedList, allWords); // only for test purposes

            // Kapseln
            Console.WriteLine("number of words: " + allWords + ", unique: " + uniqueWords + ", average word length: " + averageDigitsPerWord.ToString(CultureInfo.GetCultureInfo("en-GB")));

#if DEBUG
            Console.Read();
#endif
        }
예제 #2
0
        static void Main(string[] args)
        {
            var blackList = StopWords.ReadBlackListWords();

            if (args.Length == 0)
            {
                args = new string[] { "" };
            }

            var inputString = UIInput.ProcessInput(args[0]);

            var splitList = Splitter.SplitString(inputString);

            var cleansedList = StopWords.ReturnCleansedString(blackList, splitList);

            Console.WriteLine(CountStrings.StringsCountFromList(cleansedList));
        }
예제 #3
0
        static void Main(string[] args)
        {
            var blackList = StopWords.ReadBlackListWords();

            var inputString = UIInput.EnterInputString();

            var splitList = Splitter.SplitString(inputString);

            var cleansedList = StopWords.ReturnCleansedString(blackList, splitList);

            var allWords = CountStrings.StringsCountFromList(cleansedList);

            var uniqueWords = CountStrings.UniqueStringsCountFromList(cleansedList);

            Console.WriteLine("number of words: " + allWords + ", unique: " + uniqueWords);

#if DEBUG
            Console.Read();
#endif
        }