Beispiel #1
0
        public ManagedTextModel(TextModelConfig config)
        {
            config.ThrowIfNull(nameof(config));

            _Dictionary = (0 < config.ModelDictionaryCapacity) ? new Dictionary <string, double>(config.ModelDictionaryCapacity)
                                                               : new Dictionary <string, double>();

            foreach (var p in config.GetModelFileContent())
            {
                _Dictionary.Add(p.Key, p.Value);
            }
        }
Beispiel #2
0
 private TextModelFileReaderMMF(TextModelConfig config) : base(config.ModelFilename, config.ModelDictionaryCapacity)
 {
 }
Beispiel #3
0
            internal static void Read(TextModelConfig config, LoadModelFileContentCallback callbackAction)
            {
                var _this = new TextModelFileReaderMMF(config);

                _this.LoadModelFilenameContent(callbackAction);
            }