예제 #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 contextDialog(DialogConsole provider)
 {
     provider.SimulateInput(
         "president of USA is Barack_Obama",
         "president of USA?",
         "last is Barack_Obama",
         "president of CZ?",
         "last?"
         );
 }
예제 #4
0
 private static void debugDialog1(DialogConsole provider)
 {
     provider.SimulateInput(
         "how many children Barack_Obama has ?",
         "how many children Barack_Obama has is 2",
         "how many children Barack_Obama has ?",
         "no",
         "how many children Barack_Obama has ?",
         "how many children Miloš_Zeman has ?"
         );
 }
        public override void StartDialogWithBanker(Account account)
        {
            DialogConsole.DisplayUser("Ok so you want to deposit.");

            if (!GetAmountFromUser())
            {
                return;
            }

            GetOperationNameFromUser();

            ExecuteActionOnAccount(account);
        }
예제 #6
0
 private static void demoDialog1(DialogConsole provider)
 {
     provider.SimulateInput(
         "president of USA?",
         "president of CZ?",
         "president of USA is Barack_Obama",
         "president of USA?",
         "president of CZ?",
         "wife of USA president?",
         "wife of USA president is Michelle_Obama",
         "wife of CZ president?",
         "no",
         "wife of CZ president?"
         );
 }
예제 #7
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();
        }
예제 #8
0
        public override void ExecuteActionOnAccount(Account account)
        {
            var operations = Banker.GetOperations(account);

            if (!operations.Any())
            {
                DialogConsole.DisplayUser("You have no operations on your account.");
            }
            else
            {
                operations.ForEach(o => Console.WriteLine(o.ToString()));
            }

            DisplayBalance(account);
        }
예제 #9
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();
        }
예제 #10
0
        private static void ExplicitStateDialog(string dbPath)
        {
            var loader   = loadDB(dbPath);
            var qa       = new PoolComputation.HeuristicQAModule(new ComposedGraph(loader.DataLayer), new CallStorage(null));
            var manager  = new PoolComputation.ExplicitStateDialogManager(qa);
            var provider = new DialogConsole(manager);

            provider.SimulateInput(
                "François Hollande is president in which state ?",
                "It is France",
                "Barack Obama is president of which state ?",
                "yes",
                "dont know"
                );

            provider.Run();
        }
예제 #11
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();
        }
예제 #12
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();
        }
예제 #13
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();
        }