Esempio n. 1
0
 public static void ClassCleanup()
 {
     stringMatcher      = null;
     phoneticMatcher    = null;
     hybridMatcher      = null;
     normalizedMatchers = null;
 }
Esempio n. 2
0
        public void GivenMissingTransformation_ExpectException()
        {
            Assert.ThrowsException <InvalidCastException>(() =>
            {
                var matcher = new StringFuzzyMatcher <MyTargetType>(Targets);
            });

            Assert.ThrowsException <InvalidCastException>(() =>
            {
                var matcher = new EnPhoneticFuzzyMatcher <MyTargetType>(Targets);
            });

            Assert.ThrowsException <InvalidCastException>(() =>
            {
                var matcher = new EnHybridFuzzyMatcher <MyTargetType>(Targets, PhoneticWeightPercentage);
            });
        }
        public static string demoMethod(string Recognized)
        {
            string[] targets =
            {
                "Back",
                "Red",
                "Home",
                "Decrease"
            };



            var matcher = new EnPhoneticFuzzyMatcher <string>(targets);

            var result = matcher.FindNearest("Right");

            return(result.ToString());
        }