| | |
| | | } |
| | | catch (std::exception const &e) { |
| | | LOG(ERROR) << "Error when load punc onnx model: " << e.what(); |
| | | exit(0); |
| | | exit(-1); |
| | | } |
| | | // read inputnames outputnames |
| | | string strName; |
| | |
| | | { |
| | | } |
| | | |
| | | string CTTransformerOnline::AddPunc(const char* sz_input, vector<string> &arr_cache) |
| | | string CTTransformerOnline::AddPunc(const char* sz_input, vector<string> &arr_cache, std::string language) |
| | | { |
| | | string strResult; |
| | | vector<string> strOut; |
| | |
| | | catch (std::exception const &e) |
| | | { |
| | | LOG(ERROR) << "Error when run punc onnx forword: " << (e.what()); |
| | | exit(0); |
| | | } |
| | | return punction; |
| | | } |