#pragma once #include "engine/models/supertonic/assets.h" #include #include #include #include namespace engine::models::supertonic { struct SupertonicTextInputs { std::vector ids; std::vector mask; int64_t length = 0; }; class SupertonicTextTokenizer { public: explicit SupertonicTextTokenizer(std::shared_ptr assets); SupertonicTextInputs encode(const std::string & text, const std::string & language) const; private: std::string preprocess(const std::string & text, const std::string & language) const; std::vector utf8_to_codepoints(const std::string & text) const; std::shared_ptr assets_; }; } // namespace engine::models::supertonic