Exemple #1
0
        public void ToParametersTest1()
        {
            Phonetic target = new Phonetic("You {Bitch ; Awesomne Man}");

            string[] expected = { "\"Bitch\"" };
            string[] actual = target.ToParameters("You Bitch");

            AssertToParameters(expected, actual);
        }
Exemple #2
0
        public void ToParametersTest3()
        {
            Phonetic target = new Phonetic("Hey ? {I ; You} Dont ? {Today; As Of Yesterday}");

            string[] expected = { "\"Buddy,\"", "\"You\"", "\"Look So Good\"", "\"As Of Yesterday\"" };
            string[] actual = target.ToParameters("Hey Buddy, You Dont Look So Good As Of Yesterday");

            AssertToParameters(expected, actual);
        }
Exemple #3
0
        public void ToParametersTest2()
        {
            Phonetic target = new Phonetic("You {Bitch ; Awesomne Man} I ?");

            string[] expected = { "\"Awesomne Man\"", "\"Love You\"" };
            string[] actual = target.ToParameters("You Awesomne Man I Love You");

            AssertToParameters(expected, actual);
        }
Exemple #4
0
        public void ToParametersTest4()
        {
            Phonetic target = new Phonetic("? {Are You ; Have you ever been} ?");

            string[] expected = { "\"Hey Johnny\"", "\"Have you ever been\"", "\"to a lady gaga concert\"" };
            string[] actual = target.ToParameters("Hey Johnny Have you ever been to a lady gaga concert");

            AssertToParameters(expected, actual);
        }
        void _recognizer_PhoneticRequested(Phonetic phon, String calling)
        {
            if (!_active && !phon.AlwaysActive)
                return;

            String parameters = String.Join(" ", phon.ToParameters(calling));

            foreach(Function func in phon.Functions)
                RunFunction(func, parameters);
        }