/aosp_15_r20/external/libtextclassifier/native/utils/grammar/parsing/ |
H A D | matcher.cc | 259 void Matcher::AddTerminal(const CodepointSpan codepoint_span, in AddTerminal() argument 261 TC3_CHECK_GE(codepoint_span.second, last_end_); in AddTerminal() 264 if (codepoint_span.second > last_end_) { in AddTerminal() 268 last_end_ = codepoint_span.second; in AddTerminal() 277 codepoint_span, match_offset, in AddTerminal() 278 /*whitespace_gap=*/(codepoint_span.first - match_offset), in AddTerminal() 293 codepoint_span, match_offset, in AddTerminal() 294 /*whitespace_gap=*/(codepoint_span.first - match_offset), in AddTerminal() 306 TC3_CHECK_GE(parse_tree->codepoint_span.second, last_end_); in AddParseTree() 309 if (parse_tree->codepoint_span.second > last_end_) { in AddParseTree() [all …]
|
H A D | derivation.h | 58 if (a.GetParseTree()->codepoint_span.first != in DeduplicateDerivations() 59 b.GetParseTree()->codepoint_span.first) { in DeduplicateDerivations() 60 return a.GetParseTree()->codepoint_span.first < in DeduplicateDerivations() 61 b.GetParseTree()->codepoint_span.first; in DeduplicateDerivations() 65 return a.GetParseTree()->codepoint_span.second > in DeduplicateDerivations() 66 b.GetParseTree()->codepoint_span.second; in DeduplicateDerivations() 81 if (sorted_candidates[j].parse_tree->codepoint_span.first <= in DeduplicateDerivations() 82 candidate.parse_tree->codepoint_span.first && in DeduplicateDerivations() 83 sorted_candidates[j].parse_tree->codepoint_span.second >= in DeduplicateDerivations() 84 candidate.parse_tree->codepoint_span.second) { in DeduplicateDerivations()
|
H A D | lexer.h | 70 Symbol(const Type type, const CodepointSpan codepoint_span, in Symbol() 73 codepoint_span(codepoint_span), in Symbol() 80 codepoint_span(parse_tree->codepoint_span), in Symbol() 88 CodepointSpan codepoint_span; member 108 const CodepointSpan codepoint_span,
|
H A D | parser.cc | 186 return std::tie(a.codepoint_span.second, a.codepoint_span.first) < in SortedSymbolsForInput() 187 std::tie(b.codepoint_span.second, b.codepoint_span.first); in SortedSymbolsForInput() 208 nonterminals_->digits_nt(), symbol.codepoint_span, in EmitSymbol() 215 symbol.codepoint_span.second - symbol.codepoint_span.first; in EmitSymbol() 222 symbol.codepoint_span, symbol.match_offset, in EmitSymbol() 235 nonterminals_->uppercase_token_nt(), symbol.codepoint_span, in EmitSymbol() 245 matcher->AddTerminal(symbol.codepoint_span, symbol.match_offset, in EmitSymbol() 250 nonterminals_->token_nt(), symbol.codepoint_span, symbol.match_offset, in EmitSymbol()
|
H A D | chart.h | 44 (value_->codepoint_span.second < match_offset_); in Done() 62 item->next = chart_[item->codepoint_span.second & kChartHashTableBitmask]; in Add() 63 chart_[item->codepoint_span.second & kChartHashTableBitmask] = item; in Add() 76 while (value != nullptr && (value->codepoint_span.second > match_offset)) { in MatchesEndingAt() 99 it.Item()->codepoint_span.first == span.first) { in HasMatch()
|
H A D | parse-tree.h | 53 explicit ParseTree(const Nonterm lhs, const CodepointSpan& codepoint_span, in ParseTree() 57 codepoint_span(codepoint_span), in ParseTree() 71 return codepoint_span.first != match_offset; in HasLeadingWhitespace() 86 CodepointSpan codepoint_span; member
|
H A D | matcher_test.cc | 40 CodepointSpan codepoint_span; member 48 << ", begin=" << match.codepoint_span.first in operator <<() 49 << ", end=" << match.codepoint_span.second in operator <<() 60 return ExplainMatchResult(CodepointSpan(begin, end), arg.codepoint_span, 70 return ExplainMatchResult(CodepointSpan(begin, end), arg.codepoint_span, 110 result.back().codepoint_span = derivation.parse_tree->codepoint_span; in GetMatchResults()
|
H A D | lexer_test.cc | 37 << symbol.codepoint_span.first << ", " in operator <<() 38 << symbol.codepoint_span.second in operator <<() 82 ExplainMatchResult(CodepointSpan(begin, end), arg.codepoint_span,
|
H A D | lexer.cc | 32 const CodepointSpan codepoint_span, in AppendTokenSymbols() argument 41 CodepointIndex sub_token_start = codepoint_span.first; in AppendTokenSymbols()
|
H A D | matcher.h | 87 void AddTerminal(const CodepointSpan codepoint_span, const int match_offset, 101 void ExecuteLhsSet(const CodepointSpan codepoint_span, const int match_offset,
|
/aosp_15_r20/external/libtextclassifier/native/annotator/grammar/ |
H A D | grammar-annotator.cc | 49 return parse_tree->codepoint_span; in MatchSelectionBoundaries() 67 span = it->second->codepoint_span; in MatchSelectionBoundaries() 69 span.first = std::min(span.first, it->second->codepoint_span.first); in MatchSelectionBoundaries() 70 span.second = std::max(span.second, it->second->codepoint_span.second); in MatchSelectionBoundaries() 97 if (!SpansOverlap(selection, derivation.parse_tree->codepoint_span)) { in OverlappingDerivations() 181 input_context.Span(capturing_match->codepoint_span); in InstantiateClassificationFromDerivation()
|
/aosp_15_r20/external/libtextclassifier/native/annotator/ |
H A D | annotator.cc | 2067 CodepointSpan codepoint_span = in ModelAnnotate() local 2069 if (!codepoint_span.IsValid() || in ModelAnnotate() 2070 codepoint_span.second > line_codepoints.size()) { in ModelAnnotate() 2073 codepoint_span = selection_feature_processor_->StripBoundaryCodepoints( in ModelAnnotate() 2074 /*span_begin=*/line_codepoints[codepoint_span.first], in ModelAnnotate() 2075 /*span_end=*/line_codepoints[codepoint_span.second], codepoint_span); in ModelAnnotate() 2077 codepoint_span = StripUnpairedBrackets( in ModelAnnotate() 2078 /*span_begin=*/line_codepoints[codepoint_span.first], in ModelAnnotate() 2079 /*span_end=*/line_codepoints[codepoint_span.second], codepoint_span, in ModelAnnotate() 2084 if (codepoint_span.first != codepoint_span.second) { in ModelAnnotate() [all …]
|
H A D | feature-processor.cc | 333 const CodepointSpan& codepoint_span, in CodepointSpanToTokenSpan() argument 335 const int codepoint_start = codepoint_span.first; in CodepointSpanToTokenSpan() 336 const int codepoint_end = codepoint_span.second; in CodepointSpanToTokenSpan() 382 const CodepointSpan& codepoint_span) { in FindTokenThatContainsSpan() argument 383 const int codepoint_start = codepoint_span.first; in FindTokenThatContainsSpan() 384 const int codepoint_end = codepoint_span.second; in FindTokenThatContainsSpan()
|
H A D | feature-processor.h | 79 const CodepointSpan& codepoint_span,
|
/aosp_15_r20/external/libtextclassifier/native/utils/grammar/testing/ |
H A D | utils.h | 43 << ", begin=" << parse_tree->codepoint_span.first 44 << ", end=" << parse_tree->codepoint_span.second << ")"; 60 arg.parse_tree->codepoint_span,
|
/aosp_15_r20/external/libtextclassifier/native/actions/ |
H A D | grammar-actions.cc | 80 text_context.Span(capturing_match->codepoint_span); in InstantiateActionsFromMatch() 100 /*span=*/capturing_match->codepoint_span, group, in InstantiateActionsFromMatch()
|
/aosp_15_r20/external/libtextclassifier/native/utils/grammar/semantics/evaluators/ |
H A D | span-eval.h | 39 context.text_context->Span(context.parse_tree->codepoint_span), arena); in Apply()
|
/aosp_15_r20/external/libtextclassifier/native/annotator/datetime/ |
H A D | grammar-parser.cc | 120 evaluated_derivation.parse_tree->codepoint_span; in Parse()
|
/aosp_15_r20/external/libtextclassifier/native/utils/grammar/semantics/ |
H A D | composer.cc | 114 text_context.Span(constituent->codepoint_span), arena); in Eval()
|
/aosp_15_r20/external/libtextclassifier/native/annotator/number/ |
H A D | number_test-include.cc | 126 const CodepointSpan& codepoint_span, const std::string& collection, in IsAnnotatedSpan() argument 130 IsCorrectSpan(codepoint_span), in IsAnnotatedSpan()
|