#pragma once #include #include #include namespace engine::models::kroko_asr { class KrokoTokenizer { public: KrokoTokenizer(std::vector pieces, int32_t blank_id, int32_t unk_id); std::string decode(const std::vector & ids) const; std::vector encode_hotword(const std::string & text) const; const std::string & piece(int32_t id) const; int32_t blank_id() const noexcept; int32_t vocab_size() const noexcept; private: std::vector pieces_; int32_t blank_id_ = 0; int32_t unk_id_ = 2; }; } // namespace engine::models::kroko_asr