Home
last modified time | relevance | path

Searched refs:context_span (Results 1 – 5 of 5) sorted by relevance

/external/libtextclassifier/native/utils/grammar/parsing/
Dparser.cc92 for (int i = input.context_span.first + 1; i < input.context_span.second; in SortedSymbolsForInput()
102 CodepointIndex match_offset = input.tokens[input.context_span.first].start; in SortedSymbolsForInput()
105 if (input.context_span.first == 0 && in SortedSymbolsForInput()
121 for (int i = input.context_span.first; i < input.context_span.second; i++) { in SortedSymbolsForInput()
137 if (input.context_span.second == input.tokens.size() && in SortedSymbolsForInput()
146 input.tokens[input.context_span.first].start; in SortedSymbolsForInput()
148 input.tokens[input.context_span.second - 1].end; in SortedSymbolsForInput()
/external/libtextclassifier/native/annotator/grammar/
Dgrammar-annotator.cc279 if (const TokenSpan context_span = CodepointSpanToTokenSpan( in ClassifyText() local
282 context_span.IsValid()) { in ClassifyText()
284 input_context.context_span.first = in ClassifyText()
285 std::max(0, context_span.first - model_->context_left_num_tokens()); in ClassifyText()
288 input_context.context_span.second = in ClassifyText()
290 context_span.second + model_->context_right_num_tokens()); in ClassifyText()
/external/libtextclassifier/native/utils/grammar/
Danalyzer.cc87 context.context_span.first = 0; in BuildTextContextForInput()
88 context.context_span.second = context.tokens.size(); in BuildTextContextForInput()
Dtext-context.h52 TokenSpan context_span; member
/external/libtextclassifier/native/utils/grammar/testing/
Dutils.h86 context.context_span.first = 0; in TextContextForText()
87 context.context_span.second = context.tokens.size(); in TextContextForText()