/// <summary> /// Loads Hts transform model. /// </summary> /// <param name="treePath">The location of decision tree file.</param> /// <param name="mmfPath">The location of MMF file.</param> /// <param name="xformPath">The location of transform model file.</param> /// <param name="mappingPath">The location of transform mapping file.</param> /// <param name="windowSet">Dynamic windows set.</param> /// <param name="cmpMmf">The MasterMacroFile.</param> /// <param name="varFloorsFile">The varFloors file.</param> /// <param name="mgelrRefinedAlignmentMlf">The mgelr Refined alignment Mlf file.</param> /// <param name="streamRange">The stream range.</param> /// <param name="stateCount">The state count.</param> /// <returns>Hts model.</returns> public HtsModel LoadXformModel(string treePath, string mmfPath, string xformPath, string mappingPath, DynamicWindowSet windowSet, MasterMacroFile cmpMmf, string varFloorsFile, string mgelrRefinedAlignmentMlf, string streamRange, int stateCount) { Helper.ThrowIfNull(treePath); Helper.ThrowIfNull(mmfPath); Helper.ThrowIfNull(xformPath); Helper.ThrowIfNull(mappingPath); Helper.ThrowIfNull(cmpMmf); Helper.ThrowIfFileNotExist(varFloorsFile); HtsModel model = new HtsModel(this, PhoneSet, PosSet); model.Load(treePath, mmfPath, xformPath, mappingPath, windowSet, Questions.CustomFeatures, cmpMmf, varFloorsFile, mgelrRefinedAlignmentMlf, streamRange, stateCount); _models.Add(model.Forest.ModelType(), model); return model; }
/// <summary> /// Adds Hts model. /// </summary> /// <param name="model">The location of decision tree file.</param> public void AddModel(HtsModel model) { _models.Add(model.Forest.ModelType(), model); model.Font = this; // Clears out the question items as there has questions from external model. Questions.Items = null; }
/// <summary> /// Loads Hts model. /// </summary> /// <param name="treePath">The location of decision tree file.</param> /// <param name="mmfPath">The location of MMF file.</param> /// <param name="windowSet">Dynamic windows set.</param> /// <returns>Hts model.</returns> public HtsModel LoadModel(string treePath, string mmfPath, DynamicWindowSet windowSet) { Helper.ThrowIfNull(treePath); Helper.ThrowIfNull(mmfPath); HtsModel model = new HtsModel(this, PhoneSet, PosSet); model.Load(treePath, mmfPath, windowSet, Questions.CustomFeatures); _models.Add(model.Forest.ModelType(), model); return model; }