37 Encoder(std::map<std::string, int> encoder, std::vector<std::pair<std::string, std::string>> bpe_merges);
38 std::unordered_map<int, std::string> bytes_to_unicode();
39 std::set<std::pair<std::string, std::string>> get_pairs(std::vector<std::string> word);
40 std::string bpe(std::string token);
41 std::vector<int> encode(std::string text);
42 std::string decode(std::vector<int> tokens);
45 std::map<std::string, int> encoder;
46 std::map<int, std::string> decoder;
47 std::unordered_map<int, std::string> byte_encoder;
48 std::unordered_map<std::string, int> byte_decoder;
49 std::unordered_map<std::pair<std::string, std::string>, int,
pair_hash> bpe_ranks;
50 std::unordered_map<std::string, std::string> cache;