SearchBox/SearchBox/StopwordTester.cs

22 lines
366 B
C#
Raw Normal View History

2018-09-02 15:36:37 +00:00
using System;
using System.Collections.Generic;
namespace SearchBox
{
public class StopwordTester
{
private HashSet<string> words = new HashSet<string>();
public StopwordTester(IEnumerable<string> inWords)
{
foreach (string word in inWords)
words.Add(word);
}
public bool IsStopword(string word)
{
return words.Contains(word);
}
}
}