#ifndef TOKEN_H #define TOKEN_H #include #include #include class Tokenizer { public: std::map wordToId; std::map idToWord; Tokenizer() { add(""); // 0 add("[SYS]"); // 1 add("[USER]"); // 2 add("[AI]"); // 3 add(" "); // 4 add("\n"); // 5 add("привет"); // 6 add("как"); // 7 add("дела"); // 8 add("?"); // 9 add("я"); // 10 add("робот"); // 11 add("хорошо"); // 12 } void add(std::string word); int getID(std::string word); std::string getWord(int id); std::vector textToTokens(const std::string& text); }; class Embedder { public: std::vector> matrix; Embedder(int vSize, int dim); std::vector get(int id); }; #endif