public void SetMatchmakerToStrictContainsMatch(bool singleMatchmaker = true) { if (singleMatchmaker || Matchmakers == null) { Matchmakers = new List <IKeywordMatchmaker>(); } Matchmakers.Add(new StrictContainsKeywordMatchmaker(toLowerMasterFilteredKeywords)); compositeMatchmaker = new KeywordMatchmaker(Matchmakers); }
public void SetMatchmakerToLucenePortStem(bool singleMatchmaker = true) { if (singleMatchmaker || Matchmakers == null) { Matchmakers = new List <IKeywordMatchmaker>(); } Matchmakers.Add(new LucenePorterStemMatchmaker(toLowerMasterFilteredKeywords)); compositeMatchmaker = new KeywordMatchmaker(Matchmakers); }
public void SetMatchmakerToDictionary(bool singleMatchmaker = true) { if (singleMatchmaker || Matchmakers == null) { Matchmakers = new List <IKeywordMatchmaker>(); } Matchmakers.Add(new DictionaryMatchmaker(toLowerMasterFilteredKeywords)); compositeMatchmaker = new KeywordMatchmaker(Matchmakers); }
public void SetMatchmakerToContainsSansSpaceAndNumberMatch(bool singleMatchmaker = true) { if (singleMatchmaker || Matchmakers == null) { Matchmakers = new List <IKeywordMatchmaker>(); } Matchmakers.Add(new ContainsSansSpaceAndNumberKeywordMatchmaker(toLowerMasterFilteredKeywords)); compositeMatchmaker = new KeywordMatchmaker(Matchmakers); }
public KeywordFilterer(IEnumerable <FilteredKeyword> masterFilteredKeywords, bool usePluralizationService = true) { suspectKeywordsList = new List <string>(); toLowerMasterFilteredKeywords = masterFilteredKeywords.Select( masterKeyword => new FilteredKeyword { Keyword = masterKeyword.Keyword.ToLower(), Category = masterKeyword.Category, CategoryBit = masterKeyword.CategoryBit }).ToList(); Matchmakers = new List <IKeywordMatchmaker> { new ExactMatchKeywordMatchmaker(toLowerMasterFilteredKeywords)//, //new FuzzyContainsKeywordMatchmaker(toLowerMasterFilteredKeywords), //new StrictContainsKeywordMatchmaker(toLowerMasterFilteredKeywords), //new ContainsSansSpaceAndNumberKeywordMatchmaker(toLowerMasterFilteredKeywords, usePluralizationService) }; compositeMatchmaker = new KeywordMatchmaker(Matchmakers); }