Home
last modified time | relevance | path

Searched refs:codepoint_span (Results 1 – 20 of 20) sorted by relevance

/external/libtextclassifier/native/utils/grammar/parsing/
Dderivation.h58 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()
Dmatcher.cc259 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 …]
Dlexer.h70 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,
Dparser.cc185 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()
Dchart.h44 (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()
Dparse-tree.h53 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
Dmatcher_test.cc40 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()
Dlexer.cc32 const CodepointSpan codepoint_span, in AppendTokenSymbols() argument
41 CodepointIndex sub_token_start = codepoint_span.first; in AppendTokenSymbols()
Dmatcher.h87 void AddTerminal(const CodepointSpan codepoint_span, const int match_offset,
101 void ExecuteLhsSet(const CodepointSpan codepoint_span, const int match_offset,
Dlexer_test.cc37 << 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/
Dgrammar-annotator.cc49 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/
Dannotator.cc2031 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 …]
Dfeature-processor.cc333 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()
Dfeature-processor.h79 const CodepointSpan& codepoint_span,
/external/libtextclassifier/native/utils/grammar/testing/
Dutils.h43 << ", begin=" << parse_tree->codepoint_span.first
44 << ", end=" << parse_tree->codepoint_span.second << ")";
60 arg.parse_tree->codepoint_span,
/external/libtextclassifier/native/actions/
Dgrammar-actions.cc80 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/
Dspan-eval.h39 context.text_context->Span(context.parse_tree->codepoint_span), arena); in Apply()
/external/libtextclassifier/native/annotator/datetime/
Dgrammar-parser.cc113 evaluated_derivation.parse_tree->codepoint_span; in Parse()
/external/libtextclassifier/native/utils/grammar/semantics/
Dcomposer.cc114 text_context.Span(constituent->codepoint_span), arena); in Eval()
/external/libtextclassifier/native/annotator/number/
Dnumber_test-include.cc105 const CodepointSpan& codepoint_span, const std::string& collection, in IsAnnotatedSpan() argument
109 IsCorrectSpan(codepoint_span), in IsAnnotatedSpan()