SpellChecker.Net.Search.Spell.SpellChecker.IndexDictionary C# (CSharp) Méthode

IndexDictionary() public méthode

Indexes the data from the given IDictionary.
public IndexDictionary ( IDictionary dict ) : void
dict IDictionary dict the dictionary to index
Résultat void
        public void IndexDictionary(IDictionary dict)
        {
            IndexDictionary(dict, 300, 10);
        }

Same methods

SpellChecker::IndexDictionary ( IDictionary dict, int mergeFactor, int ramMB ) : void

Usage Example

Exemple #1
0
        public static string[] SuggestSilmilarWords(string term, int count = 10)
        {
            IndexReader indexReader = IndexReader.Open(FSDirectory.Open(_luceneDir), true);

            // Create the SpellChecker
            var spellChecker = new SpellChecker.Net.Search.Spell.SpellChecker(FSDirectory.Open(_luceneDir + "\\Spell"));

            // Create SpellChecker Index
            spellChecker.ClearIndex();
            spellChecker.IndexDictionary(new LuceneDictionary(indexReader, StronglyTyped.PropertyName <LuceneSearchModel>(x => x.Title)));
            spellChecker.IndexDictionary(new LuceneDictionary(indexReader, StronglyTyped.PropertyName <LuceneSearchModel>(x => x.Description)));

            //Suggest Similar Words
            return(spellChecker.SuggestSimilar(term, count, null, null, true));
        }
All Usage Examples Of SpellChecker.Net.Search.Spell.SpellChecker::IndexDictionary