MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / utf8_codepoints

Function utf8_codepoints

src/models/voxcpm2/tokenizer_text.cpp:51–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51std::vector<std::string> utf8_codepoints(std::string_view text) {
52 std::vector<std::string> out;
53 for (size_t offset = 0; offset < text.size();) {
54 const size_t start = offset;
55 (void) next_utf8_codepoint(text, offset);
56 out.emplace_back(text.substr(start, offset - start));
57 }
58 return out;
59}
60
61std::string normalize_text(std::string_view text) {
62 const std::string space = "\xE2\x96\x81";

Callers 1

build_cjk_split_mapFunction · 0.70

Calls 2

next_utf8_codepointFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected