修正commit 87b62d68957a2194b017a43b6c2a15424a05a984 引入的英文整句标点预测导致末尾两个单词中间的空格被删除的问题。 (#1556)
* <funasr>: <punc online>
1.修正添加标点时英文首单词和第二个单词被错误合并的问题。
* <funasr>: <punc online>
1.修正commit 87b62d68957a2194b017a43b6c2a15424a05a984 引入的英文整句标点预测导致末尾两个单词中间的空格被删除的问题。
---------
Co-authored-by: carl.che <carl.che@cloudminds.com>
| | |
| | | vector<string> WordWithPunc; |
| | | for (int i = 0; i < sentence_words_list.size(); i++) // for i in range(0, len(sentence_words_list)): |
| | | { |
| | | if (i > 0 && !(sentence_words_list[i][0] & 0x80) && (i + 1) < sentence_words_list.size() && !(sentence_words_list[i + 1][0] & 0x80)) |
| | | if (!(sentence_words_list[i][0] & 0x80) && (i + 1) < sentence_words_list.size() && !(sentence_words_list[i + 1][0] & 0x80)) |
| | | { |
| | | sentence_words_list[i] = " " + sentence_words_list[i]; |
| | | } |