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

Function clean_token

src/models/qwen3_forced_aligner/processor.cpp:82–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 (codepoint >= 0xAC00 && codepoint <= 0xD7AF);
81}
82
83bool is_kept_char(uint32_t codepoint) {
84 return codepoint == '\'' || is_ascii_alnum(codepoint) || is_cjk(codepoint) ||
85 is_kept_non_ascii_letter_or_number(codepoint);
86}
87
88std::string clean_token(const std::string & token) {
89 std::string out;
90 for (const auto & ch : utf8_chars(token)) {
91 if (is_kept_char(ch.codepoint)) {
92 out += ch.text;
93 }

Callers 2

tokenize_space_languageFunction · 0.85
tokenize_chinese_mixedFunction · 0.85

Calls 2

utf8_charsFunction · 0.85
is_kept_charFunction · 0.85

Tested by

no test coverage detected