static void Main(string[] args)
        {
            var dist22 = new SpellingSuggestor(3);

            dist22.AddRange("manly,abcde,hamburger,apple".Split(','));
            var fufuufuff = dist22.Lookup("applr").ToList();

            var art2 = new AdaptiveRadixTree <string, string>();

            art2.Add("dfgdfg", "213123");

            var dist22333 = FuzzyStringMatch.CombinedWordEditDistance("H7N0K3", "H7N0K3");

            var art  = new AdaptiveRadixTree <string, int>();
            var dict = new Dictionary <string, int>();
            int aa   = 0;

            var items = AdaptiveRadixTreeTest.GenerateTestKeys(100000).ToArray();


            foreach (var item in items)
            {
                art.Add(in item, aa);
                dict.Add(item, aa);
                aa++;
            }
            System.Diagnostics.Debug.Write(art.CalculateMetrics());
            //// System.Diagnostics.Debug.Write(art.DebugDump(true));
            //
            var now         = DateTime.UtcNow;
            int readResults = 0;

            // todo: read/write not using stream
            for (int i = 0; i < items.Length; i++)
            {
                var item = items[i];
                //readResults += art.PartialMatch(item.Substring(0, item.Length - 1) + ".", '.').Count();
                //readResults += art.PartialMatch("." + item.Substring(1), '.').Count();
                //readResults += art.RegExpMatch("[A-B-D]" + item.Substring(1)).Count();
                //readResults += art.StartsWithKeys(item.Substring(0, item.Length - 1)).Count();
                //readResults += art.RegExpNearNeighbors("[A-B-D]" + item.Substring(1), 0).Count();

                // remove()
                // fix path filter enumerator to call the filter method in-order

                // try with just one entry

                //var sdfsdf = art.RegExpNearNeighbors("BBBI", 2).ToList();


                if (i == 99999)
                {
                    "".ToLower();
                }
                if (!art.Remove(item)) // f**k at i=163 with offbranch code
                {
                    "".ToLower();
                }
                //if(i > 145 && art.DebugDump(true).Contains("EXCEPTION"))
                //    "".ToString();
            }

            //var dict4 = new Dictionary<int, string>(100000);
            //int coll = 0;
            //for(int i = 0; i < 100000; i++) {
            //    //FuzzyStringMatch.GetStableHashCode(items[i % 100000]);
            //    //items[i % 100000].GetHashCode();
            //                    if((i %100000) == 0)
            //        dict4.Clear();
            //    try {
            //        dict4.Add(FuzzyStringMatch.GetStableHashCode(items[i % 100000]), items[i % 100000]);
            //    } catch {
            //        coll++;
            //        }
            //}

            var diff = DateTime.UtcNow - now;

            System.Console.WriteLine(diff.ToString());
            //System.Console.WriteLine(readResults);
            System.Console.ReadLine();
        }
 private static double CalculateLicensePlateSimilarity(string normalized_input, string normalized_match)
 {
     //return FuzzyStringMatch.CombinedWordSimilarity(normalized_input, normalized_match);
     return(FuzzyStringMatch.CombinedWordEditDistance(normalized_input, normalized_match));
 }