/external/libtextclassifier/native/annotator/number/ |
D | number_test-include.cc | 105 const CodepointSpan& codepoint_span, const std::string& collection, in IsAnnotatedSpan() 174 IsAnnotatedSpan(CodepointSpan(12, 13), "number", in TEST_F() 176 IsAnnotatedSpan(CodepointSpan(19, 20), "number", in TEST_F() 178 IsAnnotatedSpan(CodepointSpan(32, 33), "number", in TEST_F() 180 IsAnnotatedSpan(CodepointSpan(32, 34), "percentage", in TEST_F() 183 IsAnnotatedSpan(CodepointSpan(41, 45), "number", in TEST_F() 186 IsAnnotatedSpan(CodepointSpan(57, 61), "number", in TEST_F() 274 IsAnnotatedSpan(CodepointSpan(8, 10), "number", in TEST_F() 276 IsAnnotatedSpan(CodepointSpan(8, 15), "percentage", in TEST_F() 279 IsAnnotatedSpan(CodepointSpan(20, 22), "number", in TEST_F() [all …]
|
/external/libtextclassifier/native/annotator/ |
D | strip-unpaired-brackets_test.cc | 33 CodepointSpan(8, 17)); in TEST_F() 35 CodepointSpan(8, 17)); in TEST_F() 39 CodepointSpan(9, 16)); in TEST_F() 41 CodepointSpan(9, 16)); in TEST_F() 43 CodepointSpan(8, 15)); in TEST_F() 45 CodepointSpan(8, 15)); in TEST_F() 50 CodepointSpan(12, 12)); in TEST_F() 52 CodepointSpan(12, 12)); in TEST_F() 56 CodepointSpan(11, 11)); in TEST_F() 58 CodepointSpan(0, 0)); in TEST_F() [all …]
|
D | feature-processor.h | 52 void SplitTokensOnSelectionBoundaries(const CodepointSpan& selection, 56 int CenterTokenFromClick(const CodepointSpan& span, 62 const CodepointSpan& span, const std::vector<Token>& selectable_tokens); 79 const CodepointSpan& codepoint_span, 83 CodepointSpan TokenSpanToCodepointSpan( 96 const UnicodeText& unicode_text, const CodepointSpan& span); 106 typedef std::map<CodepointSpan, std::vector<float>> EmbeddingCache; 149 const CodepointSpan& input_span, 158 const CodepointSpan& input_span, 171 const CodepointSpan& selection_span_for_feature, [all …]
|
D | annotator_jni_test.cc | 27 EXPECT_EQ(ConvertIndicesBMPToUTF8("hello", {0, 5}), CodepointSpan(0, 5)); in TEST() 31 CodepointSpan(0, 5)); in TEST() 35 CodepointSpan(0, 5)); in TEST() 40 CodepointSpan(6, 11)); in TEST() 44 CodepointSpan(6, 11)); in TEST() 51 CodepointSpan(2, 7)); in TEST() 58 CodepointSpan(2, 7)); in TEST() 65 CodepointSpan(2, 7)); in TEST() 72 CodepointSpan(2, 7)); in TEST()
|
D | strip-unpaired-brackets.h | 30 CodepointSpan StripUnpairedBrackets( 32 const UnicodeText::const_iterator& span_end, CodepointSpan span, 36 CodepointSpan StripUnpairedBrackets(const UnicodeText& context, 37 CodepointSpan span, const UniLib& unilib); 40 CodepointSpan StripUnpairedBrackets(const std::string& context, 41 CodepointSpan span, const UniLib& unilib);
|
D | strip-unpaired-brackets.cc | 26 CodepointSpan StripUnpairedBrackets( in StripUnpairedBrackets() 28 const UnicodeText::const_iterator& span_end, CodepointSpan span, in StripUnpairedBrackets() 69 CodepointSpan StripUnpairedBrackets(const UnicodeText& context, in StripUnpairedBrackets() 70 CodepointSpan span, const UniLib& unilib) { in StripUnpairedBrackets() 80 CodepointSpan StripUnpairedBrackets(const std::string& context, in StripUnpairedBrackets() 81 CodepointSpan span, const UniLib& unilib) { in StripUnpairedBrackets()
|
D | feature-processor.cc | 85 void SplitTokensOnSelectionBoundaries(const CodepointSpan& selection, in SplitTokensOnSelectionBoundaries() 140 const std::string& context, const CodepointSpan& span, in StripTokensFromOtherLines() 153 const UnicodeText::const_iterator& span_end, const CodepointSpan& span, in StripTokensFromOtherLines() 200 CodepointSpan* span) const { in LabelToSpan() 221 *span = CodepointSpan::kInvalid; in LabelToSpan() 241 *span = CodepointSpan(result_begin_codepoint + begin_ignored, in LabelToSpan() 258 bool FeatureProcessor::SpanToLabel(const CodepointSpan& span, in SpanToLabel() 333 const CodepointSpan& codepoint_span, in CodepointSpanToTokenSpan() 359 CodepointSpan TokenSpanToCodepointSpan( in TokenSpanToCodepointSpan() 366 const UnicodeText& unicode_text, const CodepointSpan& span) { in CodepointSpanToUnicodeTextRange() [all …]
|
D | types.h | 60 struct CodepointSpan { struct 61 static const CodepointSpan kInvalid; argument 63 CodepointSpan() : first(kInvalidIndex), second(kInvalidIndex) {} in CodepointSpan() argument 65 CodepointSpan(CodepointIndex start, CodepointIndex end) in CodepointSpan() argument 68 CodepointSpan& operator=(const CodepointSpan& other) = default; argument 70 bool operator==(const CodepointSpan& other) const { 74 bool operator!=(const CodepointSpan& other) const { 78 bool operator<(const CodepointSpan& other) const { 98 const CodepointSpan& span); 100 inline bool SpansOverlap(const CodepointSpan& a, const CodepointSpan& b) { in SpansOverlap() [all …]
|
D | annotator_test-include.cc | 587 CodepointSpan(12, 19)); in TEST_F() 590 CodepointSpan(15, 27)); in TEST_F() 592 CodepointSpan(4, 23)); in TEST_F() 633 CodepointSpan(10, 34)); in TEST_F() 635 CodepointSpan(9, 17)); in TEST_F() 664 CodepointSpan(26, 62)); in TEST_F() 693 CodepointSpan(55, 62)); in TEST_F() 913 CodepointSpan(15, 21)); in TEST_F() 919 CodepointSpan(0, 27)); in TEST_F() 922 EXPECT_EQ(classifier->SuggestSelection("a", {0, 1}), CodepointSpan(0, 1)); in TEST_F() [all …]
|
D | annotator.h | 189 CodepointSpan SuggestSelection( 190 const std::string& context, CodepointSpan click_indices, 196 const std::string& context, const CodepointSpan& selection_indices, 289 const UnicodeText& context_unicode, const CodepointSpan& click_indices, 304 const CodepointSpan& selection_indices, const BaseOptions& options, 322 const CodepointSpan& selection_indices, const BaseOptions& options, 336 const std::string& context, const CodepointSpan& selection_indices, 342 const std::string& context, const CodepointSpan& selection_indices, 416 CodepointSpan ComputeSelectionBoundaries( 572 CodepointSpan SnapLeftIfWhitespaceSelection(const CodepointSpan& span, [all …]
|
/external/libtextclassifier/native/utils/grammar/parsing/ |
D | chart_test.cc | 45 ParseTree* m0 = arena_.AllocAndInit<ParseTree>(/*lhs=*/0, CodepointSpan{0, 1}, in TEST_F() 49 ParseTree* m1 = arena_.AllocAndInit<ParseTree>(/*lhs=*/1, CodepointSpan{0, 2}, in TEST_F() 53 ParseTree* m2 = arena_.AllocAndInit<ParseTree>(/*lhs=*/2, CodepointSpan{0, 2}, in TEST_F() 85 ParseTree* m0 = arena_.AllocAndInit<ParseTree>(/*lhs=*/0, CodepointSpan{0, 1}, in TEST_F() 89 ParseTree* m1 = arena_.AllocAndInit<ParseTree>(/*lhs=*/1, CodepointSpan{0, 2}, in TEST_F() 93 ParseTree* m2 = arena_.AllocAndInit<ParseTree>(/*lhs=*/2, CodepointSpan{0, 2}, in TEST_F() 98 EXPECT_TRUE(chart.HasMatch(0, CodepointSpan{0, 1})); in TEST_F() 99 EXPECT_FALSE(chart.HasMatch(0, CodepointSpan{0, 2})); in TEST_F() 100 EXPECT_TRUE(chart.HasMatch(1, CodepointSpan{0, 2})); in TEST_F() 101 EXPECT_TRUE(chart.HasMatch(2, CodepointSpan{0, 2})); in TEST_F() [all …]
|
D | parse-tree.h | 53 explicit ParseTree(const Nonterm lhs, const CodepointSpan& codepoint_span, in ParseTree() 86 CodepointSpan codepoint_span; 106 const CodepointSpan arg_codepoint_span, in MappingNode() 118 const CodepointSpan arg_codepoint_span, in AssertionNode() 131 const CodepointSpan arg_codepoint_span, in ExclusionNode() 146 const CodepointSpan arg_codepoint_span, in AnnotationNode() 158 const CodepointSpan arg_codepoint_span, in SemanticExpressionNode()
|
D | matcher_test.cc | 40 CodepointSpan codepoint_span; 60 return ExplainMatchResult(CodepointSpan(begin, end), arg.codepoint_span, 70 return ExplainMatchResult(CodepointSpan(begin, end), arg.codepoint_span, 258 FindNontermForName(rules_set, "<thestarbrownfox>"), CodepointSpan{37, 42}, in TEST_F() 322 CodepointSpan{2, 6}, /*match_offset=*/2, ParseTree::Type::kDefault)); in TEST_F() 334 CodepointSpan{9, 13}, /*match_offset=*/8, ParseTree::Type::kDefault)); in TEST_F() 366 CodepointSpan{2, 6}, /*match_offset=*/2, ParseTree::Type::kDefault)); in TEST_F() 378 CodepointSpan{8, 12}, /*match_offset=*/8, ParseTree::Type::kDefault)); in TEST_F() 388 CodepointSpan{14, 18}, /*match_offset=*/14, ParseTree::Type::kDefault)); in TEST_F() 420 CodepointSpan{2, 6}, /*match_offset=*/2, ParseTree::Type::kDefault)); in TEST_F() [all …]
|
D | lexer.h | 70 Symbol(const Type type, const CodepointSpan codepoint_span, in Symbol() 88 CodepointSpan codepoint_span; 108 const CodepointSpan codepoint_span,
|
D | matcher.h | 87 void AddTerminal(const CodepointSpan codepoint_span, const int match_offset, 91 AddTerminal(CodepointSpan{begin, end}, begin, terminal); in AddTerminal() 101 void ExecuteLhsSet(const CodepointSpan codepoint_span, const int match_offset,
|
D | parser.cc | 108 nonterminals_->start_nt(), CodepointSpan{0, 0}, in SortedSymbolsForInput() 115 CodepointSpan{match_offset, match_offset}, in SortedSymbolsForInput() 123 CodepointSpan{token.start, token.end}, &symbols); in SortedSymbolsForInput() 130 CodepointSpan{match_offset, match_offset}, in SortedSymbolsForInput() 139 nonterminals_->end_nt(), CodepointSpan{match_offset, match_offset}, in SortedSymbolsForInput() 155 const CodepointSpan span{regex_matcher->Start(0, &status) + context_start, in SortedSymbolsForInput()
|
/external/libtextclassifier/native/annotator/duration/ |
D | duration_test.cc | 160 AllOf(Field(&AnnotatedSpan::span, CodepointSpan(14, 24)), in TEST_F() 179 AllOf(Field(&AnnotatedSpan::span, CodepointSpan(16, 34)), in TEST_F() 198 AllOf(Field(&AnnotatedSpan::span, CodepointSpan(14, 35)), in TEST_F() 217 AllOf(Field(&AnnotatedSpan::span, CodepointSpan(13, 65)), in TEST_F() 236 AllOf(Field(&AnnotatedSpan::span, CodepointSpan(16, 28)), in TEST_F() 255 AllOf(Field(&AnnotatedSpan::span, CodepointSpan(16, 33)), in TEST_F() 274 AllOf(Field(&AnnotatedSpan::span, CodepointSpan(19, 34)), in TEST_F() 294 AllOf(Field(&AnnotatedSpan::span, CodepointSpan(16, 39)), in TEST_F() 313 AllOf(Field(&AnnotatedSpan::span, CodepointSpan(22, 46)), in TEST_F() 342 AllOf(Field(&AnnotatedSpan::span, CodepointSpan(16, 46)), in TEST_F() [all …]
|
/external/libtextclassifier/native/annotator/vocab/ |
D | vocab-annotator-impl.cc | 67 CodepointSpan stripped_span; in Annotate() 79 const UnicodeText& context, CodepointSpan click, in ClassifyText() 82 CodepointSpan stripped_span; in ClassifyText() 89 const UnicodeText& context, const CodepointSpan click, in ClassifyTextInternal() 92 CodepointSpan* classified_span) const { in ClassifyTextInternal() 102 const CodepointSpan stripped_span = in ClassifyTextInternal()
|
D | vocab-annotator-impl.h | 43 bool ClassifyText(const UnicodeText &context, CodepointSpan click, 55 const UnicodeText &context, const CodepointSpan click, 59 CodepointSpan *classified_span) const;
|
/external/libtextclassifier/native/annotator/grammar/ |
D | grammar-annotator_test.cc | 192 CodepointSpan{11, 16}, &result)); in TEST_F() 244 UTF8ToUnicodeText("See LX 38.00", /*do_copy=*/false), CodepointSpan{4, 9}, in TEST_F() 248 UTF8ToUnicodeText("See LX 38 00", /*do_copy=*/false), CodepointSpan{4, 9}, in TEST_F() 254 CodepointSpan{4, 9}, &result)); in TEST_F() 307 CodepointSpan{20, 26}, &result)); in TEST_F() 314 CodepointSpan{11, 17}, &result)); in TEST_F() 347 /*selection=*/CodepointSpan{14, 15}, &selection)); in TEST_F() 516 /*selection=*/CodepointSpan{14, 15}, in TEST_F() 522 /*selection=*/CodepointSpan{76, 77}, in TEST_F() 528 /*selection=*/CodepointSpan{51, 51}, in TEST_F() [all …]
|
D | grammar-annotator.h | 50 const CodepointSpan& selection, 56 const UnicodeText& text, const CodepointSpan& selection, 62 const CodepointSpan& selection,
|
D | grammar-annotator.cc | 44 CodepointSpan MatchSelectionBoundaries( in MatchSelectionBoundaries() 53 CodepointSpan span{kInvalidIndex, kInvalidIndex}; in MatchSelectionBoundaries() 90 const CodepointSpan& selection, in OverlappingDerivations() 103 const CodepointSpan span = MatchSelectionBoundaries( in OverlappingDerivations() 229 const CodepointSpan& selection, in SuggestSelection() 269 const CodepointSpan& selection, in ClassifyText()
|
/external/libtextclassifier/native/annotator/translate/ |
D | translate.h | 39 bool ClassifyText(const UnicodeText& context, CodepointSpan selection_indices, 54 const UnicodeText& context, CodepointSpan selection_indices) const; 66 CodepointSpan indices,
|
/external/libtextclassifier/native/actions/ |
D | types.h | 34 MessageTextSpan(const int message_index, const CodepointSpan span, in MessageTextSpan() 44 CodepointSpan span = CodepointSpan{kInvalidIndex, kInvalidIndex};
|
/external/libtextclassifier/native/annotator/pod_ner/ |
D | pod-ner-impl.h | 46 bool SuggestSelection(const UnicodeText &context, CodepointSpan click, 49 bool ClassifyText(const UnicodeText &context, CodepointSpan click, 71 const CodepointSpan &span_of_interest,
|