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

Function AddPiece

external/sentencepiece/src/char_model_test.cc:44–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void AddPiece(ModelProto *model_proto, const std::string &piece,
45 float score = 0.0) {
46 auto *sp = model_proto->add_pieces();
47 sp->set_piece(piece);
48 sp->set_score(score);
49}
50
51TEST(ModelTest, EncodeTest) {
52 ModelProto model_proto = MakeBaseModelProto();

Callers 1

TESTFunction · 0.70

Calls 3

add_piecesMethod · 0.45
set_pieceMethod · 0.45
set_scoreMethod · 0.45

Tested by

no test coverage detected