Searched refs:WordpieceSpan (Results 1 – 3 of 3) sorted by relevance
/external/libtextclassifier/native/annotator/pod_ner/ |
D | utils.h | 31 struct WordpieceSpan { struct 33 WordpieceSpan() : begin(0), end(0) {} in WordpieceSpan() function 34 WordpieceSpan(int begin, int end) : begin(begin), end(end) {} in WordpieceSpan() argument 37 bool operator==(const WordpieceSpan &other) const { argument 47 WordpieceSpan FindWordpiecesWindowAroundSpan( argument 53 WordpieceSpan ExpandWindowAndAlign(int max_num_wordpieces_in_window, 55 WordpieceSpan wordpiece_span_to_expand); 69 WordpieceSpan FindFullTokensSpanInWindow( 71 const WordpieceSpan &wordpiece_span, int max_num_wordpieces, 140 WordpieceSpan entire_wordpiece_span_; [all …]
|
D | utils_test.cc | 628 WordpieceSpan wordpieceSpan = internal::FindWordpiecesWindowAroundSpan( in TEST() 632 EXPECT_EQ(wordpieceSpan, WordpieceSpan(0, 12)); in TEST() 641 WordpieceSpan wordpieceSpan = internal::FindWordpiecesWindowAroundSpan( in TEST() 645 EXPECT_EQ(wordpieceSpan, WordpieceSpan(3, 8)); in TEST() 651 EXPECT_EQ(wordpieceSpan, WordpieceSpan(3, 9)); in TEST() 657 EXPECT_EQ(wordpieceSpan, WordpieceSpan(9, 12)); in TEST() 666 WordpieceSpan wordpieceSpan = internal::FindWordpiecesWindowAroundSpan( in TEST() 670 EXPECT_EQ(wordpieceSpan, WordpieceSpan(0, 7)); in TEST() 679 WordpieceSpan wordpieceSpan = internal::FindWordpiecesWindowAroundSpan( in TEST() 683 EXPECT_EQ(wordpieceSpan, WordpieceSpan(5, 12)); in TEST() [all …]
|
D | utils.cc | 39 WordpieceSpan CodepointSpanToWordpieceSpan( in CodepointSpanToWordpieceSpan() 54 return WordpieceSpan(span_first_wordpiece_index, span_last_wordpiece_index); in CodepointSpanToWordpieceSpan() 96 WordpieceSpan ExpandWindowAndAlign(int max_num_wordpieces_in_window, in ExpandWindowAndAlign() 98 WordpieceSpan wordpiece_span_to_expand) { in ExpandWindowAndAlign() 111 return WordpieceSpan( in ExpandWindowAndAlign() 117 WordpieceSpan FindWordpiecesWindowAroundSpan( in FindWordpiecesWindowAroundSpan() 121 WordpieceSpan wordpiece_span_to_expand = CodepointSpanToWordpieceSpan( in FindWordpiecesWindowAroundSpan() 123 WordpieceSpan max_wordpiece_span = ExpandWindowAndAlign( in FindWordpiecesWindowAroundSpan() 128 WordpieceSpan FindFullTokensSpanInWindow( in FindFullTokensSpanInWindow() 130 const WordpieceSpan &wordpiece_span, int max_num_wordpieces, in FindFullTokensSpanInWindow() [all …]
|