private static void ApostropheEnd_Func_Bloom(Func <WordFeatureRow, bool> isWord_Word, Func <WordFeatureRow, bool> isUnknown_Word, int bloomFilterSize)
        {
            var n      = 0;
            var filter = new BloomFilter(bloomFilterSize, 1);

            //var filter = new ArrayBloomFilter(6000, 60000 * 8, 2);
            foreach (var feature in wordFeatures)
            {
                filter.Add(feature.Word);
                n++;
            }

            filter.ShowInfo();

            solutionCreator.WriteData(filter);

            var negativeStats = new WeightedSet <string>();

            CalcErrors(word =>
            {
                var w = GetApostropheEndBase(word);

                w = substCalc.SubstituteWordByCommands(w);

                if (!filter.Contains(w))
                {
                    negativeStats.Increment("!filter.Contains", 1); return(false);
                }

                var feature = new WordFeatureRow(w);
                if (!isWord_Word(feature))
                {
                    negativeStats.Increment("!isWord_Word", 1); return(false);
                }
                if (!isUnknown_Word(feature))
                {
                    negativeStats.Increment("!isUnknown_Word", 1); return(false);
                }

                return(true);
            });

            Console.WriteLine("Negative stats:");
            foreach (var kvp in negativeStats)
            {
                Console.WriteLine(new { reason = kvp.Key, count = kvp.Value });
            }

            Console.WriteLine();
        }
        private static void BloomAndApostropheS()
        {
            Console.WriteLine("Bloom and 's trick");

            var filter = new BloomFilter(60000 * 8, 1);
            var n      = 0;

            foreach (var s in words)
            {
                if (!s.EndsWith("'s"))
                {
                    filter.Add(s);
                    n++;
                }
            }

            Console.WriteLine($"Bloom filter contains {n} words");

            CalcErrors(w => w.EndsWith("'s") ? filter.Contains(w.Substring(0, w.Length - 2)) : filter.Contains(w));
        }