Support Chinese vits models (#368)
This commit is contained in:
21
sherpa-onnx/csrc/utfcpp-test.cc
Normal file
21
sherpa-onnx/csrc/utfcpp-test.cc
Normal file
@@ -0,0 +1,21 @@
|
||||
// sherpa-onnx/csrc/utfcpp-test.cc
|
||||
//
|
||||
// Copyright (c) 2023 Xiaomi Corporation
|
||||
|
||||
#include <cctype>
|
||||
#include <string>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "sherpa-onnx/csrc/text-utils.h"
|
||||
|
||||
namespace sherpa_onnx {
|
||||
|
||||
TEST(UTF8, Case1) {
|
||||
std::string hello = "你好, 早上好!世界. hello!。Hallo";
|
||||
std::vector<std::string> ss = SplitUtf8(hello);
|
||||
for (const auto &s : ss) {
|
||||
std::cout << s << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace sherpa_onnx
|
||||
Reference in New Issue
Block a user