public static EasyDialogueManager LoadDialogueFile(EasyDialogueFile file)
        {
            if (managers.ContainsKey(file))
                return managers[file];

            // load file, optimize for searching dialogues
            EasyDialogueManager manager = new EasyDialogueManager();
            managers.Add(file, manager);

            manager.easyDialogueFile = file;

            return manager;
        }
        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);
        }