Lines Matching defs:trie
39 void find_all(const marisa::Trie &trie, const std::string &str) {
42 const std::size_t num_keys = trie.find(str, &key_ids, &lengths);
56 void find_first(const marisa::Trie &trie, const std::string &str) {
58 const marisa::UInt32 key_id = trie.find_first(str, &length);
59 if (key_id != trie.notfound()) {
67 void find_last(const marisa::Trie &trie, const std::string &str) {
69 const marisa::UInt32 key_id = trie.find_last(str, &length);
70 if (key_id != trie.notfound()) {
88 marisa::Trie trie;
92 trie.mmap(&mapper, args[0]);
100 trie.load(args[0]);
113 find_all(trie, str);
117 find_first(trie, str);
121 find_last(trie, str);