示例#1
0
 public AutoCorrectTestResults(SuggestionMethods autoCompleteMethod,
                               IEnumerable <SpellingCorrectionTestResult> results, long memorySize)
 {
     AutoCompleteMethod = autoCompleteMethod;
     Results            = results;
     MemorySize         = memorySize;
 }
示例#2
0
        public DictionaryService(SuggestionMethods suggestionMethod)
        {
            this.suggestionMethod = suggestionMethod;

            MigrateLegacyDictionaries();
            LoadDictionary();

            //Subscribe to changes in the keyboard language to reload the dictionary
            Settings.Default.OnPropertyChanges(settings => settings.KeyboardAndDictionaryLanguage).Subscribe(_ => LoadDictionary());
        }
示例#3
0
        public SpellingCorrectionTester(SuggestionMethods SuggestionMethod, Languages language)
        {
            switch (SuggestionMethod)
            {
            case SuggestionMethods.NGram:
                managedSuggestion = new NGramAutoComplete();
                break;

            case SuggestionMethods.Basic:
                managedSuggestion = new BasicAutoComplete();
                break;

            case SuggestionMethods.Presage:
                managedSuggestion = new PresageSuggestions();
                break;

            default:
                throw new ArgumentOutOfRangeException("SuggestionMethod", SuggestionMethod, null);
            }

            Configure(language);
        }