/external/libtextclassifier/native/utils/grammar/parsing/ |
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()
|
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 …]
|
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,
|
D | parser.cc | 185 return std::tie(a.codepoint_span.second, a.codepoint_span.first) < in SortedSymbolsForInput() 186 std::tie(b.codepoint_span.second, b.codepoint_span.first); in SortedSymbolsForInput() 207 nonterminals_->digits_nt(), symbol.codepoint_span, in EmitSymbol() 214 symbol.codepoint_span.second - symbol.codepoint_span.first; in EmitSymbol() 221 symbol.codepoint_span, symbol.match_offset, in EmitSymbol() 234 nonterminals_->uppercase_token_nt(), symbol.codepoint_span, in EmitSymbol() 244 matcher->AddTerminal(symbol.codepoint_span, symbol.match_offset, in EmitSymbol() 249 nonterminals_->token_nt(), symbol.codepoint_span, symbol.match_offset, in EmitSymbol()
|
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()
|
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
|
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()
|
D | lexer.cc | 32 const CodepointSpan codepoint_span, in AppendTokenSymbols() argument 41 CodepointIndex sub_token_start = codepoint_span.first; in AppendTokenSymbols()
|
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,
|
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,
|
/external/libtextclassifier/native/annotator/grammar/ |
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()
|
/external/libtextclassifier/native/annotator/ |
D | annotator.cc | 2031 CodepointSpan codepoint_span = in ModelAnnotate() local 2034 if (!codepoint_span.IsValid() || in ModelAnnotate() 2035 codepoint_span.second > line_codepoints.size()) { in ModelAnnotate() 2038 codepoint_span = selection_feature_processor_->StripBoundaryCodepoints( in ModelAnnotate() 2039 /*span_begin=*/line_codepoints[codepoint_span.first], in ModelAnnotate() 2040 /*span_end=*/line_codepoints[codepoint_span.second], in ModelAnnotate() 2041 codepoint_span); in ModelAnnotate() 2043 codepoint_span = StripUnpairedBrackets( in ModelAnnotate() 2044 /*span_begin=*/line_codepoints[codepoint_span.first], in ModelAnnotate() 2045 /*span_end=*/line_codepoints[codepoint_span.second], in ModelAnnotate() [all …]
|
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()
|
D | feature-processor.h | 79 const CodepointSpan& codepoint_span,
|
/external/libtextclassifier/native/utils/grammar/testing/ |
D | utils.h | 43 << ", begin=" << parse_tree->codepoint_span.first 44 << ", end=" << parse_tree->codepoint_span.second << ")"; 60 arg.parse_tree->codepoint_span,
|
/external/libtextclassifier/native/actions/ |
D | grammar-actions.cc | 80 text_context.Span(capturing_match->codepoint_span); in InstantiateActionsFromMatch() 100 /*span=*/capturing_match->codepoint_span, group, in InstantiateActionsFromMatch()
|
/external/libtextclassifier/native/utils/grammar/semantics/evaluators/ |
D | span-eval.h | 39 context.text_context->Span(context.parse_tree->codepoint_span), arena); in Apply()
|
/external/libtextclassifier/native/annotator/datetime/ |
D | grammar-parser.cc | 113 evaluated_derivation.parse_tree->codepoint_span; in Parse()
|
/external/libtextclassifier/native/utils/grammar/semantics/ |
D | composer.cc | 114 text_context.Span(constituent->codepoint_span), arena); in Eval()
|
/external/libtextclassifier/native/annotator/number/ |
D | number_test-include.cc | 105 const CodepointSpan& codepoint_span, const std::string& collection, in IsAnnotatedSpan() argument 109 IsCorrectSpan(codepoint_span), in IsAnnotatedSpan()
|