public static Dictionary ( String baseName ) : HunspellDictionary | ||
baseName | String | |
return | HunspellDictionary |
public void TestHunspellDictionary_LoadEnUSDict() { var dictionary = ContentHelper.Dictionary("en_US"); Assert.AreEqual(2, dictionary.LookupSuffix(new[] { 'i', 'n', 'g', 's' }, 0, 4).Count()); Assert.AreEqual(1, dictionary.LookupPrefix(new[] { 'i', 'n' }, 0, 2).Count()); Assert.AreEqual(1, dictionary.LookupWord("drink").Count()); }
public void TestStem_RecursiveSuffix_EnUS() { var dictionary = ContentHelper.Dictionary("en_US"); var stemmer = new HunspellStemmer(dictionary); var stems = stemmer.Stem("drinkables").ToList(); Assert.AreEqual(1, stems.Count); Assert.AreEqual("drink", stems[0].Stem); }
public void TestStem_SimplePrefix_EnUS() { var dictionary = ContentHelper.Dictionary("en_US"); var stemmer = new HunspellStemmer(dictionary); var stems = stemmer.Stem("remove").ToList(); Assert.AreEqual(1, stems.Count); Assert.AreEqual("move", stems[0].Stem); }
public void TestStem_fietsenFiets_NlNL() { var dictionary = ContentHelper.Dictionary("nl_NL"); var stemmer = new HunspellStemmer(dictionary); var stems = stemmer.Stem("fietsen").ToList(); Assert.AreEqual(2, stems.Count); Assert.AreEqual("fietsen", stems[0].Stem); Assert.AreEqual("fiets", stems[1].Stem); stems = stemmer.Stem("fiets").ToList(); Assert.AreEqual(1, stems.Count); Assert.AreEqual("fiets", stems[0].Stem); }
public DutchAnalyzer() { _dictionary = ContentHelper.Dictionary("nl_NL"); }
public void TestHunspellDictionary_LoadFrModerneDict() { Assert.DoesNotThrow(() => ContentHelper.Dictionary("fr-moderne")); }