| 46 | } |
| 47 | |
| 48 | size_t fingerprint_pieces(const std::vector<SentencePiecePiece> & pieces) { |
| 49 | size_t seed = std::hash<size_t>{}(pieces.size()); |
| 50 | for (const auto & piece : pieces) { |
| 51 | seed = hash_combine(seed, fingerprint_piece(piece)); |
| 52 | } |
| 53 | return seed; |
| 54 | } |
| 55 | |
| 56 | ProcessorPtr load_processor(const std::filesystem::path & model_path) { |
| 57 | auto processor = std::make_shared<sentencepiece::SentencePieceProcessor>(); |
no test coverage detected