Exemplo n.º 1
0
 public AutoCorrectTestResults(AutoCompleteMethods autoCompleteMethod,
     IEnumerable<SpellingCorrectionTestResult> results, long memorySize)
 {
     AutoCompleteMethod = autoCompleteMethod;
     Results = results;
     MemorySize = memorySize;
 }
Exemplo n.º 2
0
 public AutoCorrectTestResults(AutoCompleteMethods autoCompleteMethod,
                               IEnumerable <SpellingCorrectionTestResult> results, long memorySize)
 {
     AutoCompleteMethod = autoCompleteMethod;
     Results            = results;
     MemorySize         = memorySize;
 }
        public DictionaryService(AutoCompleteMethods autoCompleteMethod)
        {
            this.autoCompleteMethod = autoCompleteMethod;

            MigrateLegacyDictionaries();
            LoadDictionary();

            //Subscribe to changes in the keyboard language to reload the dictionary
            Settings.Default.OnPropertyChanges(settings => settings.KeyboardAndDictionaryLanguage).Subscribe(_ => LoadDictionary());
        }
Exemplo n.º 4
0
        public DictionaryService(AutoCompleteMethods autoCompleteMethod)
        {
            this.autoCompleteMethod = autoCompleteMethod;

            MigrateLegacyDictionaries();
            LoadDictionary();

            //Subscribe to changes in the keyboard language to reload the dictionary
            Settings.Default.OnPropertyChanges(settings => settings.KeyboardAndDictionaryLanguage).Subscribe(_ => LoadDictionary());
        }
Exemplo n.º 5
0
        public SpellingCorrectionTester(AutoCompleteMethods autoCompleteMethod, Languages language)
        {
            switch (autoCompleteMethod)
            {
                case AutoCompleteMethods.NGram:
                    autoComplete = new NGramAutoComplete();
                    break;
                case AutoCompleteMethods.Basic:
                    autoComplete = new BasicAutoComplete();
                    break;
                default:
                    throw new ArgumentOutOfRangeException("autoCompleteMethod", autoCompleteMethod, null);
            }

            Configure(language);
        }
        public SpellingCorrectionTester(AutoCompleteMethods autoCompleteMethod, Languages language)
        {
            switch (autoCompleteMethod)
            {
            case AutoCompleteMethods.NGram:
                autoComplete = new NGramAutoComplete();
                break;

            case AutoCompleteMethods.Basic:
                autoComplete = new BasicAutoComplete();
                break;

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

            Configure(language);
        }