Example #1
0
        public IEnumerable <AutoCorrectTestResults> Run()
        {
            LoadMisspellings();

            var results = new List <AutoCorrectTestResults>();

            foreach (SuggestionMethods autoCompleteMethod in Enum.GetValues(typeof(SuggestionMethods)))
            {
                var before = GC.GetTotalMemory(true);

                var tester      = new SpellingCorrectionTester(autoCompleteMethod, language);
                var testResults = misspellings.Select(tester.TestWord);

                var after = GC.GetTotalMemory(false);

                results.Add(new AutoCorrectTestResults(autoCompleteMethod, testResults, after - before));
            }

            return(results);
        }
Example #2
0
        public IEnumerable<AutoCorrectTestResults> Run()
        {
            LoadMisspellings();

            var results = new List<AutoCorrectTestResults>();

            foreach (AutoCompleteMethods autoCompleteMethod in Enum.GetValues(typeof (AutoCompleteMethods)))
            {
                var before = GC.GetTotalMemory(true);

                var tester = new SpellingCorrectionTester(autoCompleteMethod, language);
                var testResults = misspellings.Select(tester.TestWord);

                var after = GC.GetTotalMemory(false);

                results.Add(new AutoCorrectTestResults(autoCompleteMethod, testResults, after - before));
            }

            return results;
        }