Пример #1
0
        private static void EquivalenceLearning()
        {
            var manager  = new PoolComputation.StateDialogManager(null, new FlatPresidentLayer());
            var provider = new DialogConsole(manager);

            /*  provider.SimulateInput(
             * "president of USA?",
             * "it is Barack Obama",
             * "wife of president of USA?",
             * "no",
             * "no",
             * "it is Michelle Obama"
             * );*/

            provider.SimulateInput(
                "president of USA?",
                "it is Barack Obama",
                "wife of president of USA?",
                "no",
                "no",
                "it is Michelle Obama",
                "wife of president of SK?"
                );

            provider.Run();
        }
Пример #2
0
        private static void PersistentInformationConsole()
        {
            var manager  = new PoolComputation.StateDialogManager("test.json", new FlatPresidentLayer());
            var provider = new DialogConsole(manager);

            provider.Run();
        }
Пример #3
0
        private static void MultipleNodesDistinguishing()
        {
            var manager  = new PoolComputation.StateDialogManager(null, new FlatPresidentLayer());
            var provider = new DialogConsole(manager);

            provider.SimulateInput(
                "president of USA?",
                "it is Barack Obama",
                "president of USA?",
                "president of CZ?",
                "it is Miloš Zeman"
                );

            provider.Run();
        }
Пример #4
0
        private static void MultipleAdvice(string dbPath)
        {
            var loader = loadDB(dbPath);

            var manager  = new PoolComputation.StateDialogManager(null, loader.DataLayer);
            var provider = new DialogConsole(manager);

            provider.SimulateInput(
                "François Hollande is president in which state ?",
                "France",
                "France",
                "François Hollande is president in which state ?"
                );

            provider.Run();
        }
Пример #5
0
        private static void StateBasedManager()
        {
            var manager  = new PoolComputation.StateDialogManager(null, new Database.PresidentLayer());
            var provider = new DialogConsole(manager);

            provider.SimulateInput(
                "president of USA?",
                "it is Barack_Obama",
                "president of CZ?",
                "name of his wife?",
                "yes",
                "it is Ivana_Zemanová",
                "president of D?",
                "his wife?"
                );

            provider.Run();
        }
Пример #6
0
        private static void ExternalDB()
        {
            var manager  = new PoolComputation.StateDialogManager(null, new FlatPresidentLayer());
            var provider = new DialogConsole(manager);

            provider.SimulateInput(
                "president of USA?",
                "it is blabla",
                "president of USA?",
                "it is Barack Obama",
                "president of USA?",
                "president of CZ?",
                "his wife?",
                "yes",
                "it is Ivana Zemanová",
                "president of USA?",
                "his wife?"
                );

            provider.Run();
        }
Пример #7
0
        private static void InconsistencyDBTesting(string dbPath)
        {
            var loader = new Database.TripletLoader.Loader(dbPath);
            var graph  = new ComposedGraph(loader.DataLayer);

            WikidataHelper.PreprocessData(loader, graph);

            var manager  = new PoolComputation.StateDialogManager(null, loader.DataLayer);
            var provider = new DialogConsole(manager);

            provider.SimulateInput(
                "name of Czech Republic president",
                "it is Miloš Zeman",
                "name of Russia president",
                "it is Vladimir Putin",
                "name of United States of America president",
                "it is Barack Obama",
                "name of United States of America president",
                "name of Czech Republic president"
                );

            provider.Run();
        }