We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e13f7db commit a135324Copy full SHA for a135324
sherpa-onnx/csrc/text-utils.cc
@@ -312,7 +312,7 @@ static std::vector<std::string> MergeCharactersIntoWords(
312
while (i < n) {
313
const auto &w = words[i];
314
if (w.size() >= 3 || (w.size() == 2 && !IsSpecial(w)) ||
315
- (w.size() == 1 && (IsPunct(w[0]) || std::isspace(w[0])))) {
+ (w.size() == 1 && (IsPunct(w[0]) || std::isspace(static_cast<uint8_t>(w[0]))))) {
316
if (prev != -1) {
317
std::string t;
318
for (; prev < i; ++prev) {
@@ -322,7 +322,7 @@ static std::vector<std::string> MergeCharactersIntoWords(
322
ans.push_back(std::move(t));
323
}
324
325
- if (!std::isspace(w[0])) {
+ if (!std::isspace(static_cast<uint8_t>(w[0]))) {
326
ans.push_back(w);
327
328
++i;
0 commit comments