Searched refs:key_ids (Results 1 - 20 of 20) sorted by relevance

/external/marisa-trie/v0_1_5/tests/
H A Dtrie-test.cc11 FindCallback(std::vector<marisa_alpha::UInt32> *key_ids, argument
13 : key_ids_(key_ids), key_lengths_(key_lengths) {}
33 PredictCallback(std::vector<marisa_alpha::UInt32> *key_ids, argument
35 : key_ids_(key_ids), keys_(keys) {}
75 std::vector<marisa_alpha::UInt32> key_ids; local
76 trie.build(keys, &key_ids,
83 ASSERT(key_ids.size() == 5);
84 ASSERT(key_ids[0] == 3);
85 ASSERT(key_ids[1] == 1);
86 ASSERT(key_ids[
193 std::vector<marisa_alpha::UInt32> key_ids; local
435 std::vector<marisa_alpha::UInt32> key_ids; local
533 std::vector<marisa_alpha::UInt32> key_ids; local
597 std::vector<marisa_alpha::UInt32> key_ids; local
[all...]
H A Dc-test.c98 marisa_alpha_uint32 key_ids[8]; local
130 ASSERT(marisa_alpha_build(trie, keys, 5, NULL, NULL, key_ids,
138 ASSERT(key_ids[0] == 3);
139 ASSERT(key_ids[1] == 1);
140 ASSERT(key_ids[2] == 0);
141 ASSERT(key_ids[3] == 3);
142 ASSERT(key_ids[4] == 2);
146 key_ids[i], key_buf, sizeof(key_buf), &key_length) == MARISA_ALPHA_OK);
152 ASSERT(key_id == key_ids[i]);
156 ASSERT(key_id == key_ids[
[all...]
/external/marisa-trie/tests/
H A Dtrie-test.cc11 FindCallback(std::vector<marisa::UInt32> *key_ids, argument
13 : key_ids_(key_ids), key_lengths_(key_lengths) {}
33 PredictCallback(std::vector<marisa::UInt32> *key_ids, argument
35 : key_ids_(key_ids), keys_(keys) {}
75 std::vector<marisa::UInt32> key_ids; local
76 trie.build(keys, &key_ids, 1 | MARISA_WITHOUT_TAIL | MARISA_LABEL_ORDER);
82 ASSERT(key_ids.size() == 5);
83 ASSERT(key_ids[0] == 3);
84 ASSERT(key_ids[1] == 1);
85 ASSERT(key_ids[
191 std::vector<marisa::UInt32> key_ids; local
417 std::vector<marisa::UInt32> key_ids; local
515 std::vector<marisa::UInt32> key_ids; local
579 std::vector<marisa::UInt32> key_ids; local
[all...]
H A Dc-test.c93 marisa_uint32 key_ids[8]; local
123 ASSERT(marisa_build(trie, keys, 5, NULL, NULL, key_ids,
130 ASSERT(key_ids[0] == 3);
131 ASSERT(key_ids[1] == 1);
132 ASSERT(key_ids[2] == 0);
133 ASSERT(key_ids[3] == 3);
134 ASSERT(key_ids[4] == 2);
138 key_ids[i], key_buf, sizeof(key_buf), &key_length) == MARISA_OK);
144 ASSERT(key_id == key_ids[i]);
148 ASSERT(key_id == key_ids[
[all...]
/external/marisa-trie/lib/marisa/
H A Dtrie-search.cc12 PredictCallback(T key_ids, U keys, std::size_t max_num_results) argument
13 : key_ids_(key_ids), keys_(keys),
79 UInt32 *key_ids, std::size_t *key_lengths,
84 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results);
88 UInt32 *key_ids, std::size_t *key_lengths,
93 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results);
97 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths,
102 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results);
106 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths,
111 MakeContainer(key_ids), MakeContaine
78 find(const char *str, UInt32 *key_ids, std::size_t *key_lengths, std::size_t max_num_results) const argument
87 find(const char *ptr, std::size_t length, UInt32 *key_ids, std::size_t *key_lengths, std::size_t max_num_results) const argument
96 find(const char *str, std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, std::size_t max_num_results) const argument
105 find(const char *ptr, std::size_t length, std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, std::size_t max_num_results) const argument
142 predict(const char *str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
151 predict(const char *ptr, std::size_t length, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
160 predict(const char *str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
170 predict(const char *ptr, std::size_t length, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
180 predict_breadth_first(const char *str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
188 predict_breadth_first(const char *ptr, std::size_t length, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
196 predict_breadth_first(const char *str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
205 predict_breadth_first(const char *ptr, std::size_t length, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
214 predict_depth_first(const char *str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
222 predict_depth_first(const char *ptr, std::size_t length, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
230 predict_depth_first( const char *str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
239 predict_depth_first( const char *ptr, std::size_t length, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
462 find_(T query, U key_ids, V key_lengths, std::size_t max_num_results) const argument
523 predict_breadth_first_(T query, U key_ids, V keys, std::size_t max_num_results) const argument
590 predict_depth_first_(T query, U key_ids, V keys, std::size_t max_num_results) const argument
[all...]
H A Dtrie-c.cc82 marisa_uint32 *key_ids, int flags) {
86 h->trie.build(keys, num_keys, key_lengths, key_weights, key_ids, flags);
190 marisa_uint32 *key_ids, size_t *key_lengths,
198 *num_results = h->trie.find(ptr, key_ids, key_lengths, max_num_results);
201 key_ids, key_lengths, max_num_results);
258 const char *ptr, size_t length, marisa_uint32 *key_ids,
261 key_ids, max_num_results, num_results);
265 const char *ptr, size_t length, marisa_uint32 *key_ids,
274 ptr, key_ids, NULL, max_num_results);
277 ptr, length, key_ids, NUL
80 marisa_build(marisa_trie *h, const char * const *keys, size_t num_keys, const size_t *key_lengths, const double *key_weights, marisa_uint32 *key_ids, int flags) argument
188 marisa_find(const marisa_trie *h, const char *ptr, size_t length, marisa_uint32 *key_ids, size_t *key_lengths, size_t max_num_results, size_t *num_results) argument
257 marisa_predict(const marisa_trie *h, const char *ptr, size_t length, marisa_uint32 *key_ids, size_t max_num_results, size_t *num_results) argument
264 marisa_predict_breadth_first(const marisa_trie *h, const char *ptr, size_t length, marisa_uint32 *key_ids, size_t max_num_results, size_t *num_results) argument
282 marisa_predict_depth_first(const marisa_trie *h, const char *ptr, size_t length, marisa_uint32 *key_ids, size_t max_num_results, size_t *num_results) argument
[all...]
H A Dtrie.h28 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, st
[all...]
H A Dtrie-inline.h29 UInt32 *key_ids, std::size_t *key_lengths,
32 key_ids, key_lengths, max_num_results);
36 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths,
39 key_ids, key_lengths, max_num_results);
75 UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const {
76 return predict(str.c_str(), str.length(), key_ids, keys, max_num_results);
80 std::vector<UInt32> *key_ids, std::vector<std::string> *keys,
82 return predict(str.c_str(), str.length(), key_ids, keys, max_num_results);
86 UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const {
88 key_ids, key
28 find(const std::string &str, UInt32 *key_ids, std::size_t *key_lengths, std::size_t max_num_results) const argument
35 find(const std::string &str, std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, std::size_t max_num_results) const argument
74 predict(const std::string &str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
79 predict(const std::string &str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
85 predict_breadth_first(const std::string &str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
91 predict_breadth_first(const std::string &str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
98 predict_depth_first(const std::string &str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
104 predict_depth_first(const std::string &str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
[all...]
H A Dtrie-build.cc13 UInt32 *key_ids, int flags) {
31 build_trie(temp_keys, key_ids, flags);
35 std::vector<UInt32> *key_ids, int flags) {
43 build_trie(temp_keys, key_ids, flags);
47 std::vector<UInt32> *key_ids, int flags) {
57 build_trie(temp_keys, key_ids, flags);
61 std::vector<UInt32> *key_ids, int flags) {
62 if (key_ids == NULL) {
68 key_ids->swap(temp_key_ids);
72 UInt32 *key_ids, in
11 build(const char * const *keys, std::size_t num_keys, const std::size_t *key_lengths, const double *key_weights, UInt32 *key_ids, int flags) argument
34 build(const std::vector<std::string> &keys, std::vector<UInt32> *key_ids, int flags) argument
46 build(const std::vector<std::pair<std::string, double> > &keys, std::vector<UInt32> *key_ids, int flags) argument
60 build_trie(Vector<Key<String> > &keys, std::vector<UInt32> *key_ids, int flags) argument
71 build_trie(Vector<Key<String> > &keys, UInt32 *key_ids, int flags) argument
[all...]
/external/marisa-trie/tools/
H A Dmarisa-benchmark.cc174 marisa::Trie *trie, std::vector<marisa::UInt32> *key_ids) {
176 trie->build(keys, key_ids, num_tries
185 const std::vector<marisa::UInt32> &key_ids) {
188 for (std::size_t i = 0; i < key_ids.size(); ++i) {
190 trie.restore(key_ids[i], &key);
196 print_time_info(key_ids.size(), cl.elasped());
201 const std::vector<marisa::UInt32> &key_ids) {
205 if (key_id != key_ids[i]) {
215 const std::vector<marisa::UInt32> &key_ids) {
221 if ((num_keys == 0) || (found_key_ids.back() != key_ids[
173 benchmark_build(const std::vector<Key> &keys, int num_tries, marisa::Trie *trie, std::vector<marisa::UInt32> *key_ids) argument
183 benchmark_restore(const marisa::Trie &trie, const std::vector<Key> &keys, const std::vector<marisa::UInt32> &key_ids) argument
199 benchmark_lookup(const marisa::Trie &trie, const std::vector<Key> &keys, const std::vector<marisa::UInt32> &key_ids) argument
213 benchmark_find(const marisa::Trie &trie, const std::vector<Key> &keys, const std::vector<marisa::UInt32> &key_ids) argument
229 benchmark_predict_breadth_first(const marisa::Trie &trie, const std::vector<Key> &keys, const std::vector<marisa::UInt32> &key_ids) argument
250 benchmark_predict_depth_first(const marisa::Trie &trie, const std::vector<Key> &keys, const std::vector<marisa::UInt32> &key_ids) argument
274 std::vector<marisa::UInt32> key_ids; local
[all...]
H A Dmarisa-predict.cc62 std::vector<marisa::UInt32> key_ids; local
69 key_ids.clear();
74 str, &key_ids, &keys, max_num_results);
77 str, &key_ids, &keys, max_num_results);
85 std::cout << key_ids[i] << '\t' << keys[i] << '\t' << str << '\n';
H A Dmarisa-find.cc40 static std::vector<marisa::UInt32> key_ids; local
42 const std::size_t num_keys = trie.find(str, &key_ids, &lengths);
46 std::cout << key_ids[i] << '\t'; local
52 key_ids.clear();
/external/marisa-trie/v0_1_5/tools/
H A Dmarisa_alpha-benchmark.cc174 marisa_alpha::Trie *trie, std::vector<marisa_alpha::UInt32> *key_ids) {
176 trie->build(keys, key_ids, num_tries
185 const std::vector<marisa_alpha::UInt32> &key_ids) {
188 for (std::size_t i = 0; i < key_ids.size(); ++i) {
190 trie.restore(key_ids[i], &key);
196 print_time_info(key_ids.size(), cl.elasped());
201 const std::vector<marisa_alpha::UInt32> &key_ids) {
205 if (key_id != key_ids[i]) {
215 const std::vector<marisa_alpha::UInt32> &key_ids) {
221 if ((num_keys == 0) || (found_key_ids.back() != key_ids[
173 benchmark_build(const std::vector<Key> &keys, int num_tries, marisa_alpha::Trie *trie, std::vector<marisa_alpha::UInt32> *key_ids) argument
183 benchmark_restore(const marisa_alpha::Trie &trie, const std::vector<Key> &keys, const std::vector<marisa_alpha::UInt32> &key_ids) argument
199 benchmark_lookup(const marisa_alpha::Trie &trie, const std::vector<Key> &keys, const std::vector<marisa_alpha::UInt32> &key_ids) argument
213 benchmark_find(const marisa_alpha::Trie &trie, const std::vector<Key> &keys, const std::vector<marisa_alpha::UInt32> &key_ids) argument
229 benchmark_predict_breadth_first(const marisa_alpha::Trie &trie, const std::vector<Key> &keys, const std::vector<marisa_alpha::UInt32> &key_ids) argument
250 benchmark_predict_depth_first(const marisa_alpha::Trie &trie, const std::vector<Key> &keys, const std::vector<marisa_alpha::UInt32> &key_ids) argument
274 std::vector<marisa_alpha::UInt32> key_ids; local
[all...]
H A Dmarisa_alpha-predict.cc62 std::vector<marisa_alpha::UInt32> key_ids; local
69 key_ids.clear();
74 str, &key_ids, &keys, max_num_results);
77 str, &key_ids, &keys, max_num_results);
85 std::cout << key_ids[i] << '\t' << keys[i] << '\t' << str << '\n';
H A Dmarisa_alpha-find.cc40 static std::vector<marisa_alpha::UInt32> key_ids; local
42 const std::size_t num_keys = trie.find(str, &key_ids, &lengths);
46 std::cout << key_ids[i] << '\t'; local
52 key_ids.clear();
/external/marisa-trie/v0_1_5/lib/marisa_alpha/
H A Dtrie-search.cc12 PredictCallback(T key_ids, U keys, std::size_t max_num_results) argument
13 : key_ids_(key_ids), keys_(keys),
80 UInt32 *key_ids, std::size_t *key_lengths,
85 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results);
89 UInt32 *key_ids, std::size_t *key_lengths,
95 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results);
99 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths,
104 MakeContainer(key_ids), MakeContainer(key_lengths), max_num_results);
108 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths,
114 MakeContainer(key_ids), MakeContaine
79 find(const char *str, UInt32 *key_ids, std::size_t *key_lengths, std::size_t max_num_results) const argument
88 find(const char *ptr, std::size_t length, UInt32 *key_ids, std::size_t *key_lengths, std::size_t max_num_results) const argument
98 find(const char *str, std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, std::size_t max_num_results) const argument
107 find(const char *ptr, std::size_t length, std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, std::size_t max_num_results) const argument
147 predict(const char *str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
156 predict(const char *ptr, std::size_t length, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
166 predict(const char *str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
176 predict(const char *ptr, std::size_t length, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
187 predict_breadth_first(const char *str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
195 predict_breadth_first(const char *ptr, std::size_t length, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
204 predict_breadth_first(const char *str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
213 predict_breadth_first(const char *ptr, std::size_t length, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
223 predict_depth_first(const char *str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
231 predict_depth_first(const char *ptr, std::size_t length, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
240 predict_depth_first( const char *str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
249 predict_depth_first( const char *ptr, std::size_t length, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
481 find_(T query, U key_ids, V key_lengths, std::size_t max_num_results) const argument
546 predict_breadth_first_(T query, U key_ids, V keys, std::size_t max_num_results) const argument
617 predict_depth_first_(T query, U key_ids, V keys, std::size_t max_num_results) const argument
[all...]
H A Dtrie.h28 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, st
[all...]
H A Dtrie-inline.h29 UInt32 *key_ids, std::size_t *key_lengths,
32 key_ids, key_lengths, max_num_results);
36 std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths,
39 key_ids, key_lengths, max_num_results);
76 UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const {
77 return predict(str.c_str(), str.length(), key_ids, keys, max_num_results);
81 std::vector<UInt32> *key_ids, std::vector<std::string> *keys,
83 return predict(str.c_str(), str.length(), key_ids, keys, max_num_results);
87 UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const {
89 key_ids, key
28 find(const std::string &str, UInt32 *key_ids, std::size_t *key_lengths, std::size_t max_num_results) const argument
35 find(const std::string &str, std::vector<UInt32> *key_ids, std::vector<std::size_t> *key_lengths, std::size_t max_num_results) const argument
75 predict(const std::string &str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
80 predict(const std::string &str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
86 predict_breadth_first(const std::string &str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
92 predict_breadth_first(const std::string &str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
99 predict_depth_first(const std::string &str, UInt32 *key_ids, std::string *keys, std::size_t max_num_results) const argument
105 predict_depth_first(const std::string &str, std::vector<UInt32> *key_ids, std::vector<std::string> *keys, std::size_t max_num_results) const argument
[all...]
H A Dtrie-c.cc82 const double *key_weights, marisa_alpha_uint32 *key_ids, int flags) try {
86 h->trie.build(keys, num_keys, key_lengths, key_weights, key_ids, flags);
215 marisa_alpha_uint32 *key_ids, size_t *key_lengths,
223 *num_results = h->trie.find(ptr, key_ids, key_lengths, max_num_results);
226 key_ids, key_lengths, max_num_results);
287 const char *ptr, size_t length, marisa_alpha_uint32 *key_ids,
290 key_ids, max_num_results, num_results);
295 marisa_alpha_uint32 *key_ids, size_t max_num_results,
304 ptr, key_ids, NULL, max_num_results);
307 ptr, length, key_ids, NUL
80 marisa_alpha_build(marisa_alpha_trie *h, const char * const *keys, size_t num_keys, const size_t *key_lengths, const double *key_weights, marisa_alpha_uint32 *key_ids, int flags) argument
213 marisa_alpha_find(const marisa_alpha_trie *h, const char *ptr, size_t length, marisa_alpha_uint32 *key_ids, size_t *key_lengths, size_t max_num_results, size_t *num_results) argument
286 marisa_alpha_predict(const marisa_alpha_trie *h, const char *ptr, size_t length, marisa_alpha_uint32 *key_ids, size_t max_num_results, size_t *num_results) argument
293 marisa_alpha_predict_breadth_first( const marisa_alpha_trie *h, const char *ptr, size_t length, marisa_alpha_uint32 *key_ids, size_t max_num_results, size_t *num_results) argument
314 marisa_alpha_predict_depth_first( const marisa_alpha_trie *h, const char *ptr, size_t length, marisa_alpha_uint32 *key_ids, size_t max_num_results, size_t *num_results) argument
[all...]
H A Dtrie-build.cc13 UInt32 *key_ids, int flags) {
33 build_trie(temp_keys, key_ids, flags);
37 std::vector<UInt32> *key_ids, int flags) {
46 build_trie(temp_keys, key_ids, flags);
50 std::vector<UInt32> *key_ids, int flags) {
60 build_trie(temp_keys, key_ids, flags);
64 std::vector<UInt32> *key_ids, int flags) {
65 if (key_ids == NULL) {
72 key_ids->swap(temp_key_ids);
81 UInt32 *key_ids, in
11 build(const char * const *keys, std::size_t num_keys, const std::size_t *key_lengths, const double *key_weights, UInt32 *key_ids, int flags) argument
36 build(const std::vector<std::string> &keys, std::vector<UInt32> *key_ids, int flags) argument
49 build(const std::vector<std::pair<std::string, double> > &keys, std::vector<UInt32> *key_ids, int flags) argument
63 build_trie(Vector<Key<String> > &keys, std::vector<UInt32> *key_ids, int flags) argument
80 build_trie(Vector<Key<String> > &keys, UInt32 *key_ids, int flags) argument
[all...]

Completed in 205 milliseconds