Пример #1
0
        public static Auger Create(params string[] filenames)
        {
            var d1 = new Dictionary <string, uint>();
            var d2 = new Dictionary <string[], uint>(new StringArrayEqualityComparerTwo());
            var d3 = new Dictionary <string[], uint>(new StringArrayEqualityComparerThree());

            Read(ref d1, ref d2, ref d3, filenames);

            var mkn   = new ModifiedKneserNey(d3, d2, d1);
            var words = d1.Keys.ToArray();

            Array.Sort(words, StringComparer.OrdinalIgnoreCase);
            var sc = new SpellCheck(words, new BoundedJaroWinkler());

            return(new Auger(sc, mkn, mkn));
        }
Пример #2
0
 protected bool Equals(SpellCheck other)
 {
     return(Equals(StringSimilarityProvider, other.StringSimilarityProvider) &&
            base.Equals(other));
 }