Beispiel #1
0
        public void SetMatchmakerToDictionary(bool singleMatchmaker = true)
        {
            if (singleMatchmaker || Matchmakers == null)
            {
                Matchmakers = new List <IKeywordMatchmaker>();
            }

            Matchmakers.Add(new DictionaryMatchmaker(toLowerWordsInDictionary));

            compositeMatchmaker = new KeywordMatchmaker(Matchmakers);
        }
Beispiel #2
0
        public void SetMatchmakerToContainsMatch(bool singleMatchmaker = true)
        {
            if (singleMatchmaker || Matchmakers == null)
            {
                Matchmakers = new List <IKeywordMatchmaker>();
            }

            Matchmakers.Add(new ContainsMatchmaker(toLowerCategorizedKeywordsToBeRemoved));

            compositeMatchmaker = new KeywordMatchmaker(Matchmakers);
        }
Beispiel #3
0
        public void SetMatchmakerToLucenePortStem(bool singleMatchmaker = true)
        {
            if (singleMatchmaker || Matchmakers == null)
            {
                Matchmakers = new List <IKeywordMatchmaker>();
            }

            Matchmakers.Add(new LucenePorterStemMatchmaker(toLowerUncategorizedKeywordsToBeRemoved));

            compositeMatchmaker = new KeywordMatchmaker(Matchmakers);
        }
Beispiel #4
0
        public KeywordFilterer(IEnumerable <FilteredKeyword> uncategorizedKeywordsToBeRemoved, bool usePluralizationService = true)
        {
            suspectKeywordsList = new List <string>();
            StoreListOfUncategorizedKeywordsToBeRemoved(uncategorizedKeywordsToBeRemoved);
            StoreListOfWordsInDictionary(null);
            StoreListOfCategorizedKeywordsToBeRemoved(null);

            Matchmakers = new List <IKeywordMatchmaker>
            {
                new ExactMatchKeywordMatchmaker(toLowerUncategorizedKeywordsToBeRemoved)
                //new FuzzyContainsKeywordMatchmaker(toLowerUncategorizedKeywordsToBeRemoved),
                //new StrictContainsKeywordMatchmaker(toLowerUncategorizedKeywordsToBeRemoved),
                //new ContainsSansSpaceAndNumberKeywordMatchmaker(toLowerUncategorizedKeywordsToBeRemoved, usePluralizationService)
            };

            compositeMatchmaker = new KeywordMatchmaker(Matchmakers);
        }