Esempio n. 1
0
        static void Test_Classifier()
        {
            Classifier cFier;

            cFier = new Classifier();

            cFier.TeachPhrases("time", "what time is it");
            cFier.TeachPhrases("time", "time");
            cFier.TeachPhrases("time", "What will the Time be in 10 minits");
            cFier.TeachPhrases("time", "What is the time");

            cFier.TeachPhrases("date", "what date is it");
            cFier.TeachPhrases("date", "date");
            cFier.TeachPhrases("date", "What will the date be in 10 days");
            cFier.TeachPhrases("date", "What is the date");

            string f;

            f = "whats is the time";
            QOut(f, "=", cFier.FindFirstCategory(f));

            f = "date";
            QOut(f, "=", cFier.FindFirstCategory(f));

            f = "tell me the date";
            QOut(f, "=", cFier.FindFirstCategory(f));

            f = "tell me tim";
            QOut(f, "=", cFier.FindFirstCategory(f));

            f = "what time is it";
            QOut(f, "=", cFier.FindFirstCategory(f));

            QOut();
            InKey();

            return;
        }