char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
afd439df1
char/aliceai-t5-moe
1#include "../src/unicode.h" 2 3#include <cstdio> 4#include <string> 5#include <vector> 6 7int main () { 8const std::vector < std::string > regex_exprs = { 9"[~][A-Za-z]+| ?[\\p{S}]+|\\s+" , 10 }; 11const std::vector < std::string > expected = {" ~" ,"foo" }; 12const auto actual = unicode_regex_split (" ~foo" ,regex_exprs , false); 13 14if (actual != expected ) { 15fprintf (stderr ,"unexpected split:" ); 16for (const auto & piece :actual ) { 17fprintf (stderr ," [%s]" ,piece .c_str ()); 18 } 19fprintf (stderr ,"\n" ); 20return 1 ; 21 } 22 23return 0 ; 24}