Home
last modified time | relevance | path

Searched refs:wordpiece_indices (Results 1 – 5 of 5) sorted by relevance

/external/libtextclassifier/native/annotator/pod_ner/
Dpod-ner-impl.cc270 const VectorSpan<int> &wordpiece_indices, in ExecuteModel() argument
274 if (wordpiece_indices.size() > max_num_effective_wordpieces_) { in ExecuteModel()
279 if (wordpiece_indices.size() <= 0 || token_starts.size() <= 0 || in ExecuteModel()
282 << wordpiece_indices.size() in ExecuteModel()
312 {1, wordpiece_indices.size() + num_additional_wordpieces}); in ExecuteModel()
324 for (int wordpiece_index : wordpiece_indices) { in ExecuteModel()
347 std::vector<int32_t> *wordpiece_indices, in PrepareText() argument
381 token_starts->push_back(wordpiece_indices->size()); in PrepareText()
383 wordpiece_indices->push_back(wordpiece_id); in PrepareText()
401 std::vector<int32_t> wordpiece_indices; in AnnotateAroundSpanOfInterest() local
[all …]
Dpod-ner-impl.h61 const VectorSpan<int> &wordpiece_indices,
66 std::vector<int32_t> *wordpiece_indices,
Dutils.cc153 WindowGenerator::WindowGenerator(const std::vector<int32_t> &wordpiece_indices, in WindowGenerator() argument
159 : wordpiece_indices_(&wordpiece_indices), in WindowGenerator()
165 span_of_interest, tokens, token_starts, wordpiece_indices.size(), in WindowGenerator()
Dutils_test.cc848 std::vector<int32_t> wordpiece_indices = {10, 20, 30, 40, 50, 60, 70, 80}; in TEST() local
852 WindowGenerator window_generator(wordpiece_indices, token_starts, tokens, in TEST()
864 ASSERT_EQ(cur_wordpiece_indices[i], wordpiece_indices[i]); in TEST()
878 ASSERT_EQ(cur_wordpiece_indices[i], wordpiece_indices[i + 2]); in TEST()
892 ASSERT_EQ(cur_wordpiece_indices[i], wordpiece_indices[i + 5]); in TEST()
Dutils.h120 WindowGenerator(const std::vector<int32_t> &wordpiece_indices,