Ejemplo n.º 1
0
        public static IMorphoModel Create(MorphoModelConfig config)
        {
            config.ThrowIfNull("config");

            switch (config.TreeDictionaryType)
            {
            case MorphoModelConfig.TreeDictionaryTypeEnum.Classic:
            case MorphoModelConfig.TreeDictionaryTypeEnum.FastMemPlenty:
            {
                var model = new MorphoModel(config);

                return(model);
            }

            case MorphoModelConfig.TreeDictionaryTypeEnum.Native:
            {
                var model = new MorphoModelNative(config);

                return(model);
            }

            default:
                throw (new ArgumentException(config.TreeDictionaryType.ToString()));
            }
        }
Ejemplo n.º 2
0
 private static void CheckConfig(MorphoModelConfig config)
 {
     config.ThrowIfNull("config");
     config.MorphoTypesFilenames.ThrowIfNullOrWhiteSpaceAnyElement("config.MorphoTypesFilenames");
     config.ProperNamesFilenames.ThrowIfNullOrWhiteSpaceAnyElement("config.ProperNamesFilenames");
     config.CommonFilenames.ThrowIfNullOrWhiteSpaceAnyElement("config.CommonFilenames");
 }