Searched refs:encoded_text (Results 1 – 5 of 5) sorted by relevance
/external/libtextclassifier/utils/sentencepiece/ |
D | encoder_test.cc | 42 std::vector<int> encoded_text; in TEST() local 43 EXPECT_TRUE(encoder.Encode("hellothere", &encoded_text)); in TEST() 44 EXPECT_THAT(encoded_text, ElementsAre(0, 3, 5, 1)); in TEST() 51 std::vector<int> encoded_text; in TEST() local 52 EXPECT_TRUE(encoder.Encode("hellothere", &encoded_text)); in TEST() 53 EXPECT_THAT(encoded_text, ElementsAre(0, 2, 4, 5, 1)); in TEST() 66 std::vector<int> encoded_text; in TEST() local 67 EXPECT_TRUE(encoder.Encode("hellhello", &encoded_text)); in TEST() 68 EXPECT_THAT(encoded_text, ElementsAre(0, 2, 3, 1)); in TEST() 71 std::vector<int> encoded_text; in TEST() local [all …]
|
D | encoder.cc | 22 std::vector<int>* encoded_text) const { in Encode() 25 *encoded_text = {start_code_, end_code_}; in Encode() 81 *encoded_text = {start_code_, end_code_}; in Encode() 85 encoded_text->resize(num_pieces + 2); in Encode() 86 (*encoded_text)[num_pieces + 1] = end_code_; in Encode() 89 (*encoded_text)[i] = segmentation[pos].piece_id; in Encode() 92 (*encoded_text)[0] = start_code_; in Encode()
|
D | encoder.h | 59 std::vector<int>* encoded_text) const;
|
/external/selinux/python/sepolgen/src/sepolgen/ |
D | util.py | 97 encoded_text = text.encode(encoding) 102 encoded_text = text.encode('utf-8') 103 return encoded_text
|
/external/pdfium/fpdfsdk/ |
D | fpdfview.cpp | 380 ByteString encoded_text = text.UTF16LE_Encode(); in Utf16EncodeMaybeCopyAndReturnLength() local 381 unsigned long len = encoded_text.GetLength(); in Utf16EncodeMaybeCopyAndReturnLength() 383 memcpy(buffer, encoded_text.c_str(), len); in Utf16EncodeMaybeCopyAndReturnLength()
|