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

Method unk_id

external/sentencepiece/src/sentencepiece_processor.cc:999–1003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

997}
998
999int SentencePieceProcessor::unk_id() const {
1000 const int id = PieceToId(absl::string_view(model_->unk_piece().data()));
1001 if (IsUnknown(id)) return id;
1002 return -1;
1003}
1004
1005int SentencePieceProcessor::bos_id() const {
1006 const int id = PieceToId(absl::string_view(model_->bos_piece().data()));

Callers 3

TESTFunction · 0.45
InitMetaPiecesMethod · 0.45
TESTFunction · 0.45

Calls 2

unk_pieceMethod · 0.80
dataMethod · 0.45

Tested by 2

TESTFunction · 0.36
TESTFunction · 0.36