| | |
| | | { |
| | | } |
| | | |
| | | void CTTransformer::InitPunc(const std::string &punc_model, const std::string &punc_config, int thread_num){ |
| | | void CTTransformer::InitPunc(const std::string &punc_model, const std::string &punc_config, const std::string &token_file, int thread_num){ |
| | | session_options.SetIntraOpNumThreads(thread_num); |
| | | session_options.SetGraphOptimizationLevel(ORT_ENABLE_ALL); |
| | | session_options.DisableCpuMemArena(); |
| | |
| | | for (auto& item : m_strOutputNames) |
| | | m_szOutputNames.push_back(item.c_str()); |
| | | |
| | | m_tokenizer.OpenYaml(punc_config.c_str()); |
| | | m_tokenizer.OpenYaml(punc_config.c_str(), token_file.c_str()); |
| | | m_tokenizer.JiebaInit(punc_config); |
| | | } |
| | | |