Lines Matching refs:trie
39 void find_all(const marisa_alpha::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_alpha::Trie &trie, const std::string &str) {
58 const marisa_alpha::UInt32 key_id = trie.find_first(str, &length);
59 if (key_id != trie.notfound()) {
67 void find_last(const marisa_alpha::Trie &trie, const std::string &str) {
69 const marisa_alpha::UInt32 key_id = trie.find_last(str, &length);
70 if (key_id != trie.notfound()) {
88 marisa_alpha::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);