public void TestBuild() { string LF = Environment.NewLine; string input = "oneword" + LF + "twoword" + LF + "threeword"; PlainTextDictionary ptd = new PlainTextDictionary(new StringReader(input)); Store.Directory ramDir = NewDirectory(); SpellChecker spellChecker = new SpellChecker(ramDir); spellChecker.IndexDictionary(ptd, NewIndexWriterConfig(TEST_VERSION_CURRENT, null), false); string[] similar = spellChecker.SuggestSimilar("treeword", 2); assertEquals(2, similar.Length); assertEquals(similar[0], "threeword"); assertEquals(similar[1], "oneword"); spellChecker.Dispose(); ramDir.Dispose(); }
public FileIterator(PlainTextDictionary outerInstance) { this.outerInstance = outerInstance; }