Lines Matching refs:trie
9 $trie = new marisa::Trie;
10 $trie->build($keyset);
11 print("no. keys: ", $trie->num_keys(), "\n");
12 print("no. tries: ", $trie->num_tries(), "\n");
13 print("no. nodes: ", $trie->num_nodes(), "\n");
14 print("size: ", $trie->io_size(), "\n");
19 $trie->lookup($agent);
23 $trie->lookup($agent);
27 if ($trie->lookup(agent)) {
31 print("ice: ", $trie->lookup("ice"), "\n");
32 print("ice-cream: ", $trie->lookup("ice-cream"), "\n");
33 if ($trie->lookup("ice-age") == $marisa::INVALID_KEY_ID) {
37 $trie->save("sample.dic");
38 $trie->load("sample.dic");
41 $trie->reverse_lookup($agent);
44 $trie->reverse_lookup($agent);
47 print("2: ", $trie->reverse_lookup(2), "\n");
48 print("3: ", $trie->reverse_lookup(3), "\n");
50 $trie->mmap("sample.dic");
53 while ($trie->common_prefix_search($agent)) {
59 while ($trie->predictive_search($agent)) {