/external/marisa-trie/tests/ |
D | trie-test.cc | 11 FindCallback(std::vector<marisa::UInt32> *key_ids, in FindCallback() argument 13 : key_ids_(key_ids), key_lengths_(key_lengths) {} in FindCallback() 33 PredictCallback(std::vector<marisa::UInt32> *key_ids, in PredictCallback() argument 35 : key_ids_(key_ids), keys_(keys) {} in PredictCallback() 75 std::vector<marisa::UInt32> key_ids; in TestTrie() local 76 trie.build(keys, &key_ids, 1 | MARISA_WITHOUT_TAIL | MARISA_LABEL_ORDER); in TestTrie() 82 ASSERT(key_ids.size() == 5); in TestTrie() 83 ASSERT(key_ids[0] == 3); in TestTrie() 84 ASSERT(key_ids[1] == 1); in TestTrie() 85 ASSERT(key_ids[2] == 0); in TestTrie() [all …]
|
D | c-test.c | 93 marisa_uint32 key_ids[8]; in TestTrie() local 123 ASSERT(marisa_build(trie, keys, 5, NULL, NULL, key_ids, in TestTrie() 130 ASSERT(key_ids[0] == 3); in TestTrie() 131 ASSERT(key_ids[1] == 1); in TestTrie() 132 ASSERT(key_ids[2] == 0); in TestTrie() 133 ASSERT(key_ids[3] == 3); in TestTrie() 134 ASSERT(key_ids[4] == 2); in TestTrie() 138 key_ids[i], key_buf, sizeof(key_buf), &key_length) == MARISA_OK); in TestTrie() 144 ASSERT(key_id == key_ids[i]); in TestTrie() 148 ASSERT(key_id == key_ids[i]); in TestTrie() [all …]
|
/external/marisa-trie/v0_1_5/tests/ |
D | trie-test.cc | 11 FindCallback(std::vector<marisa_alpha::UInt32> *key_ids, in FindCallback() argument 13 : key_ids_(key_ids), key_lengths_(key_lengths) {} in FindCallback() 33 PredictCallback(std::vector<marisa_alpha::UInt32> *key_ids, in PredictCallback() argument 35 : key_ids_(key_ids), keys_(keys) {} in PredictCallback() 75 std::vector<marisa_alpha::UInt32> key_ids; in TestTrie() local 76 trie.build(keys, &key_ids, in TestTrie() 83 ASSERT(key_ids.size() == 5); in TestTrie() 84 ASSERT(key_ids[0] == 3); in TestTrie() 85 ASSERT(key_ids[1] == 1); in TestTrie() 86 ASSERT(key_ids[2] == 0); in TestTrie() [all …]
|
D | c-test.c | 98 marisa_alpha_uint32 key_ids[8]; in TestTrie() local 130 ASSERT(marisa_alpha_build(trie, keys, 5, NULL, NULL, key_ids, in TestTrie() 138 ASSERT(key_ids[0] == 3); in TestTrie() 139 ASSERT(key_ids[1] == 1); in TestTrie() 140 ASSERT(key_ids[2] == 0); in TestTrie() 141 ASSERT(key_ids[3] == 3); in TestTrie() 142 ASSERT(key_ids[4] == 2); in TestTrie() 146 key_ids[i], key_buf, sizeof(key_buf), &key_length) == MARISA_ALPHA_OK); in TestTrie() 152 ASSERT(key_id == key_ids[i]); in TestTrie() 156 ASSERT(key_id == key_ids[i]); in TestTrie() [all …]
|
/external/marisa-trie/lib/marisa/ |
D | trie.h | 28 UInt32 *key_ids = NULL, int flags = 0); 31 std::vector<UInt32> *key_ids = NULL, int flags = 0); 33 std::vector<UInt32> *key_ids = NULL, int flags = 0); 69 UInt32 *key_ids, std::size_t *key_lengths, 72 UInt32 *key_ids, std::size_t *key_lengths, 75 UInt32 *key_ids, std::size_t *key_lengths, 79 std::vector<UInt32> *key_ids = NULL, 83 std::vector<UInt32> *key_ids = NULL, 87 std::vector<UInt32> *key_ids = NULL, 115 UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const; [all …]
|
D | trie-search.cc | 12 PredictCallback(T key_ids, U keys, std::size_t max_num_results) in PredictCallback() argument 13 : key_ids_(key_ids), keys_(keys), in PredictCallback() 79 UInt32 *key_ids, std::size_t *key_lengths, in find() argument 84 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results); in find() 88 UInt32 *key_ids, std::size_t *key_lengths, in find() argument 93 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results); in find() 97 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, in find() argument 102 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results); in find() 106 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, in find() argument 111 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results); in find() [all …]
|
D | trie-inline.h | 29 UInt32 *key_ids, std::size_t *key_lengths, in find() argument 32 key_ids, key_lengths, max_num_results); in find() 36 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, in find() argument 39 key_ids, key_lengths, max_num_results); in find() 75 UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const { in predict() argument 76 return predict(str.c_str(), str.length(), key_ids, keys, max_num_results); in predict() 80 std::vector<UInt32> *key_ids, std::vector<std::string> *keys, in predict() argument 82 return predict(str.c_str(), str.length(), key_ids, keys, max_num_results); in predict() 86 UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const { in predict_breadth_first() argument 88 key_ids, keys, max_num_results); in predict_breadth_first() [all …]
|
D | trie-c.cc | 82 marisa_uint32 *key_ids, int flags) { in marisa_build() argument 86 h->trie.build(keys, num_keys, key_lengths, key_weights, key_ids, flags); in marisa_build() 190 marisa_uint32 *key_ids, size_t *key_lengths, in marisa_find() argument 198 *num_results = h->trie.find(ptr, key_ids, key_lengths, max_num_results); in marisa_find() 201 key_ids, key_lengths, max_num_results); in marisa_find() 258 const char *ptr, size_t length, marisa_uint32 *key_ids, in marisa_predict() argument 261 key_ids, max_num_results, num_results); in marisa_predict() 265 const char *ptr, size_t length, marisa_uint32 *key_ids, in marisa_predict_breadth_first() argument 274 ptr, key_ids, NULL, max_num_results); in marisa_predict_breadth_first() 277 ptr, length, key_ids, NULL, max_num_results); in marisa_predict_breadth_first() [all …]
|
D | trie-build.cc | 13 UInt32 *key_ids, int flags) { in build() argument 31 build_trie(temp_keys, key_ids, flags); in build() 35 std::vector<UInt32> *key_ids, int flags) { in build() argument 43 build_trie(temp_keys, key_ids, flags); in build() 47 std::vector<UInt32> *key_ids, int flags) { in build() argument 57 build_trie(temp_keys, key_ids, flags); in build() 61 std::vector<UInt32> *key_ids, int flags) { in build_trie() argument 62 if (key_ids == NULL) { in build_trie() 68 key_ids->swap(temp_key_ids); in build_trie() 72 UInt32 *key_ids, int flags) { in build_trie() argument [all …]
|
/external/marisa-trie/v0_1_5/lib/marisa_alpha/ |
D | trie.h | 28 UInt32 *key_ids = NULL, int flags = 0); 31 std::vector<UInt32> *key_ids = NULL, int flags = 0); 33 std::vector<UInt32> *key_ids = NULL, int flags = 0); 69 UInt32 *key_ids, std::size_t *key_lengths, 72 UInt32 *key_ids, std::size_t *key_lengths, 75 UInt32 *key_ids, std::size_t *key_lengths, 79 std::vector<UInt32> *key_ids = NULL, 83 std::vector<UInt32> *key_ids = NULL, 87 std::vector<UInt32> *key_ids = NULL, 115 UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const; [all …]
|
D | trie-search.cc | 12 PredictCallback(T key_ids, U keys, std::size_t max_num_results) in PredictCallback() argument 13 : key_ids_(key_ids), keys_(keys), in PredictCallback() 80 UInt32 *key_ids, std::size_t *key_lengths, in find() argument 85 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results); in find() 89 UInt32 *key_ids, std::size_t *key_lengths, in find() argument 95 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results); in find() 99 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, in find() argument 104 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results); in find() 108 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, in find() argument 114 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results); in find() [all …]
|
D | trie-inline.h | 29 UInt32 *key_ids, std::size_t *key_lengths, in find() argument 32 key_ids, key_lengths, max_num_results); in find() 36 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, in find() argument 39 key_ids, key_lengths, max_num_results); in find() 76 UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const { in predict() argument 77 return predict(str.c_str(), str.length(), key_ids, keys, max_num_results); in predict() 81 std::vector<UInt32> *key_ids, std::vector<std::string> *keys, in predict() argument 83 return predict(str.c_str(), str.length(), key_ids, keys, max_num_results); in predict() 87 UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const { in predict_breadth_first() argument 89 key_ids, keys, max_num_results); in predict_breadth_first() [all …]
|
D | trie-c.cc | 82 const double *key_weights, marisa_alpha_uint32 *key_ids, int flags) try { in marisa_alpha_build() argument 86 h->trie.build(keys, num_keys, key_lengths, key_weights, key_ids, flags); in marisa_alpha_build() 215 marisa_alpha_uint32 *key_ids, size_t *key_lengths, in marisa_alpha_find() argument 223 *num_results = h->trie.find(ptr, key_ids, key_lengths, max_num_results); in marisa_alpha_find() 226 key_ids, key_lengths, max_num_results); in marisa_alpha_find() 287 const char *ptr, size_t length, marisa_alpha_uint32 *key_ids, in marisa_alpha_predict() argument 290 key_ids, max_num_results, num_results); in marisa_alpha_predict() 295 marisa_alpha_uint32 *key_ids, size_t max_num_results, in marisa_alpha_predict_breadth_first() argument 304 ptr, key_ids, NULL, max_num_results); in marisa_alpha_predict_breadth_first() 307 ptr, length, key_ids, NULL, max_num_results); in marisa_alpha_predict_breadth_first() [all …]
|
D | trie-build.cc | 13 UInt32 *key_ids, int flags) { in build() argument 33 build_trie(temp_keys, key_ids, flags); in build() 37 std::vector<UInt32> *key_ids, int flags) { in build() argument 46 build_trie(temp_keys, key_ids, flags); in build() 50 std::vector<UInt32> *key_ids, int flags) { in build() argument 60 build_trie(temp_keys, key_ids, flags); in build() 64 std::vector<UInt32> *key_ids, int flags) { in build_trie() argument 65 if (key_ids == NULL) { in build_trie() 72 key_ids->swap(temp_key_ids); in build_trie() 81 UInt32 *key_ids, int flags) { in build_trie() argument [all …]
|
/external/marisa-trie/tools/ |
D | marisa-benchmark.cc | 174 marisa::Trie *trie, std::vector<marisa::UInt32> *key_ids) { in benchmark_build() argument 176 trie->build(keys, key_ids, num_tries in benchmark_build() 185 const std::vector<marisa::UInt32> &key_ids) { in benchmark_restore() argument 188 for (std::size_t i = 0; i < key_ids.size(); ++i) { in benchmark_restore() 190 trie.restore(key_ids[i], &key); in benchmark_restore() 196 print_time_info(key_ids.size(), cl.elasped()); in benchmark_restore() 201 const std::vector<marisa::UInt32> &key_ids) { in benchmark_lookup() argument 205 if (key_id != key_ids[i]) { in benchmark_lookup() 215 const std::vector<marisa::UInt32> &key_ids) { in benchmark_find() argument 221 if ((num_keys == 0) || (found_key_ids.back() != key_ids[i])) { in benchmark_find() [all …]
|
D | marisa-predict.cc | 62 std::vector<marisa::UInt32> key_ids; in predict() local 69 key_ids.clear(); in predict() 74 str, &key_ids, &keys, max_num_results); in predict() 77 str, &key_ids, &keys, max_num_results); in predict() 85 std::cout << key_ids[i] << '\t' << keys[i] << '\t' << str << '\n'; in predict()
|
D | marisa-find.cc | 40 static std::vector<marisa::UInt32> key_ids; in find_all() local 42 const std::size_t num_keys = trie.find(str, &key_ids, &lengths); in find_all() 46 std::cout << key_ids[i] << '\t'; in find_all() 52 key_ids.clear(); in find_all()
|
/external/marisa-trie/v0_1_5/tools/ |
D | marisa_alpha-benchmark.cc | 174 marisa_alpha::Trie *trie, std::vector<marisa_alpha::UInt32> *key_ids) { in benchmark_build() argument 176 trie->build(keys, key_ids, num_tries in benchmark_build() 185 const std::vector<marisa_alpha::UInt32> &key_ids) { in benchmark_restore() argument 188 for (std::size_t i = 0; i < key_ids.size(); ++i) { in benchmark_restore() 190 trie.restore(key_ids[i], &key); in benchmark_restore() 196 print_time_info(key_ids.size(), cl.elasped()); in benchmark_restore() 201 const std::vector<marisa_alpha::UInt32> &key_ids) { in benchmark_lookup() argument 205 if (key_id != key_ids[i]) { in benchmark_lookup() 215 const std::vector<marisa_alpha::UInt32> &key_ids) { in benchmark_find() argument 221 if ((num_keys == 0) || (found_key_ids.back() != key_ids[i])) { in benchmark_find() [all …]
|
D | marisa_alpha-predict.cc | 62 std::vector<marisa_alpha::UInt32> key_ids; in predict() local 69 key_ids.clear(); in predict() 74 str, &key_ids, &keys, max_num_results); in predict() 77 str, &key_ids, &keys, max_num_results); in predict() 85 std::cout << key_ids[i] << '\t' << keys[i] << '\t' << str << '\n'; in predict()
|
D | marisa_alpha-find.cc | 40 static std::vector<marisa_alpha::UInt32> key_ids; in find_all() local 42 const std::size_t num_keys = trie.find(str, &key_ids, &lengths); in find_all() 46 std::cout << key_ids[i] << '\t'; in find_all() 52 key_ids.clear(); in find_all()
|
/external/marisa-trie/ |
D | android_diff.txt | 95 - key_ids->swap(temp_key_ids); 103 + key_ids->swap(temp_key_ids); 135 - marisa_uint32 *key_ids, int flags) try { 136 + marisa_uint32 *key_ids, int flags) { 140 h->trie.build(keys, num_keys, key_lengths, key_weights, key_ids, flags); 272 marisa_uint32 *key_ids, size_t *key_lengths, 279 key_ids, key_lengths, max_num_results); 308 const char *ptr, size_t length, marisa_uint32 *key_ids, 315 ptr, length, key_ids, NULL, max_num_results); 323 const char *ptr, size_t length, marisa_uint32 *key_ids, [all …]
|