Esempio n. 1
0
 static void Main(string[] args)
 {
     ParseInformationState isParser = new ParseInformationState();
     InformationState IS = new InformationState();
     IS =  isParser.parseIS(@"D:\Mukesh\Work\INSA\DialogueManagement\NLP\PredicateCalculus\bin\Debug\InformationState.xml");
     Console.WriteLine(IS.toString());
 }
        public void ComponentInitialization(string path)
        {
            ParseInformationState isParser = new ParseInformationState();
            IS = new InformationState();
            IS = isParser.parseIS(path+ "res/InformationState.xml");
            MascaretApplication.Instance.VRComponentFactory.Log(IS.toString());
            edm = new EasyDialogueManager ();

            string[] fileEntries = Directory.GetFiles(path+"res/dialogue");
            foreach (string fileName in fileEntries)
            {
                MascaretApplication.Instance.VRComponentFactory.Log("................Easy dialogue files ...........::" + fileName);
                if (fileName.ToString().EndsWith(".xml"))
                {
                    EasyDialogueFile easyDialPlan = EasyDialogueManager.LoadDialogueFileFromPath1(fileName);
                    //	DialogueFile dialoguePlan 	= EasyDialogueManager.LoadDialogueFileFromPath (Application.dataPath + "/StreamingAssets/res/tutorial.xml");
                    planLib.AddPlan(easyDialPlan);
                    MascaretApplication.Instance.VRComponentFactory.Log("................Easy dialogue files ....file loaded successfully");

                }

            }
            //edm =  EasyDialogueManager.LoadDialogueFile(Application.dataPath + "/StreamingAssets/res/tutorial.xml");

            components = new InitialiseComponents (path);
            config = new ComponentConfig();
            config = components.Config;

            extractor = new TemplateExtractor();
            extractor.setupComponent(config);
            //		TextComponent tc = new TextComponent();
            hmmComponent = new HMMComponent();
            hmmComponent.setupComponent(config);

            dialogueInterpreter = new DialogueInterpreter();
            dialogueInterpreter.setupComponent(config);
            nlgDialogueGenerator = new NaturalLanguageDialogueGenerator();
            nlgDialogueGenerator.setupComponent(config);
        }