From 03108f25c262e80c85776d66a0be64025a8ab342 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期五, 18 八月 2023 16:24:37 +0800
Subject: [PATCH] update funasr-runtime-deploy-offline-cpu-zh.sh
---
funasr/runtime/onnxruntime/src/vocab.cpp | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/vocab.cpp b/funasr/runtime/onnxruntime/src/vocab.cpp
index 70553df..dc40978 100644
--- a/funasr/runtime/onnxruntime/src/vocab.cpp
+++ b/funasr/runtime/onnxruntime/src/vocab.cpp
@@ -34,14 +34,12 @@
}
}
-string Vocab::Vector2String(vector<int> in)
+void Vocab::Vector2String(vector<int> in, std::vector<std::string> &preds)
{
- int i;
- stringstream ss;
for (auto it = in.begin(); it != in.end(); it++) {
- ss << vocab[*it];
+ string word = vocab[*it];
+ preds.emplace_back(word);
}
- return ss.str();
}
int Str2Int(string str)
--
Gitblit v1.9.1