Home
last modified time | relevance | path

Searched refs:LookupId (Results 1 – 15 of 15) sorted by relevance

/external/tflite-support/tensorflow_lite_support/cc/text/tokenizers/
Dregex_tokenizer.cc92 bool RegexTokenizer::LookupId(absl::string_view key, int* result) const { in LookupId() function in tflite::support::text::tokenizer::RegexTokenizer
111 return LookupId(kStart, start_token); in GetStartToken()
115 return LookupId(kPad, pad_token); in GetPadToken()
119 return LookupId(kUnknown, unknown_token); in GetUnknownToken()
Dbert_tokenizer.h78 bool LookupId(absl::string_view key, int* result) const;
126 bool LookupId(absl::string_view key, int* result) const override { in LookupId() function
127 return vocab_.LookupId(key, result); in LookupId()
Dtokenizer.h41 virtual bool LookupId(absl::string_view key, int* result) const = 0;
Dregex_tokenizer.h40 bool LookupId(absl::string_view key, int* result) const override;
Dsentencepiece_tokenizer.h54 bool LookupId(absl::string_view key, int* result) const override { in LookupId() function
Dtokenizer_jni_lib.cc77 tokenizer->LookupId(token, &id); in nativeConvertTokensToIds()
Dbert_tokenizer.cc39 bool FlatHashMapBackedWordpiece::LookupId(const absl::string_view key, in LookupId() function in tflite::support::text::tokenizer::FlatHashMapBackedWordpiece
/external/libtextclassifier/native/utils/
Dbert_tokenizer_test.cc96 ASSERT_FALSE(tokenizer->LookupId("iDontExist", &i)); in TEST()
98 ASSERT_TRUE(tokenizer->LookupId("i", &i)); in TEST()
100 ASSERT_TRUE(tokenizer->LookupId("'", &i)); in TEST()
102 ASSERT_TRUE(tokenizer->LookupId("m", &i)); in TEST()
104 ASSERT_TRUE(tokenizer->LookupId("question", &i)); in TEST()
Dbert_tokenizer.h73 bool LookupId(absl::string_view key, int* result) const;
120 bool LookupId(absl::string_view key, int* result) const override { in LookupId() function
121 return vocab_.LookupId(key, result); in LookupId()
Dbert_tokenizer.cc43 bool FlatHashMapBackedWordpiece::LookupId(const absl::string_view key, in LookupId() function in libtextclassifier3::FlatHashMapBackedWordpiece
/external/libtextclassifier/native/annotator/pod_ner/
Dpod-ner-impl.cc145 if (!tokenizer->LookupId("[CLS]", cls_id)) { in FindSpecialWordpieceIds()
149 if (!tokenizer->LookupId("[SEP]", sep_id)) { in FindSpecialWordpieceIds()
153 if (!tokenizer->LookupId(".", period_id)) { in FindSpecialWordpieceIds()
157 if (!tokenizer->LookupId("[UNK]", unknown_id)) { in FindSpecialWordpieceIds()
371 if (!tokenizer_->LookupId(wordpiece, &(wordpiece_ids.emplace_back()))) { in PrepareText()
/external/tflite-support/tensorflow_lite_support/ios/text/tokenizers/Sources/
DTFLTokenizerUtil.mm37 tokenizer->LookupId(cToken, &id);
/external/tflite-support/tensorflow_lite_support/cc/task/text/nlclassifier/
Dbert_nl_classifier.cc103 tokenizer_->LookupId(tokens[i], &input_ids[i]); in Preprocess()
Dnl_classifier.cc229 if (tokenizer_->LookupId(token, &token_id)) { in Preprocess()
/external/tflite-support/tensorflow_lite_support/cc/task/text/qa/
Dbert_question_answerer.cc264 tokenizer_->LookupId(token, &input_ids[i]); in Preprocess()