Skip to content

Commit f4e6463

Browse files
committed
fix building on mac.
1 parent 54f0f1a commit f4e6463

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/tokenizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,15 +742,15 @@ NearestKeywordSearcher::Node *NearestKeywordSearcher::make_tree(std::vector<Item
742742
return r;
743743
}
744744

745-
void NearestKeywordSearcher::rebuild(const std::unordered_map<int, std::string> keywords)
745+
void NearestKeywordSearcher::rebuild(const std::unordered_map<_vocab::id, std::string> keywords)
746746
{
747747
root.reset(nullptr);
748748

749749
std::vector<Item> sub;
750750

751751
for (auto & st: keywords)
752752
{
753-
sub.emplace_back(st.second, st.first);
753+
sub.emplace_back(st.second, (int)st.first);
754754
}
755755
root.reset(make_tree(sub, 0, -1));
756756
}

src/tokenizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class BPEProcessor1: public Processor
196196
class NearestKeywordSearcher
197197
{
198198
public:
199-
void rebuild(const std::unordered_map<int, std::string> keywords);
199+
void rebuild(const std::unordered_map<_vocab::id, std::string> keywords);
200200

201201
std::string search(std::string &input, int &kw_id) const;
202202

0 commit comments

Comments
 (0)