Exemple #1
0
        private static SetNative LoadBinaryModel(BinaryModelConfig config)
        {
            var set = new SetNative(config.ModelDictionaryCapacity);

            foreach (var modelFilename in config.ModelFilenames)
            {
                LoadFromBinFile(modelFilename, set);
            }

            return(set);
        }
Exemple #2
0
 public static InitParam_v1 Create(BinaryModelConfig cfg, LanguageEnum lang) => new InitParam_v1()
 {
     ModelConfigs = cfg, Language = lang
 };
Exemple #3
0
 public NativeTextMMFModelBinary(BinaryModelConfig config)
 {
     _Set = LoadBinaryModel(config);
 }
Exemple #4
0
 public NativeTextMMFModelBinary(BinaryModelConfig config)
 {
     _NativeMemAllocator = new NativeMemAllocationMediator(nativeBlockAllocSize: 1024 * 1024);
     _Set = LoadBinaryModel(config, _NativeMemAllocator);
 }