Home
last modified time | relevance | path

Searched refs:CodepointSpan (Results 1 – 8 of 8) sorted by relevance

/external/libtextclassifier/smartselect/
Dtext-classification-model.h56 CodepointSpan SuggestSelection(const std::string& context,
57 CodepointSpan click_indices) const;
63 const std::string& context, CodepointSpan click_indices,
69 CodepointSpan StripPunctuation(CodepointSpan selection,
96 const std::string& context, CodepointSpan span,
100 std::vector<CodepointSpan>* selection_label_spans) const;
103 std::pair<CodepointSpan, float> SuggestSelectionInternal(
104 const std::string& context, CodepointSpan click_indices) const;
108 CodepointSpan SuggestSelectionSymmetrical(const std::string& context,
109 CodepointSpan click_indices) const;
Dfeature-processor.h57 void StripTokensFromOtherLines(const std::string& context, CodepointSpan span,
62 void SplitTokensOnSelectionBoundaries(CodepointSpan selection,
66 int CenterTokenFromClick(CodepointSpan span, const std::vector<Token>& tokens);
71 CodepointSpan span, const std::vector<Token>& selectable_tokens);
84 CodepointSpan codepoint_span);
87 CodepointSpan TokenSpanToCodepointSpan(
135 CodepointSpan input_span,
140 bool ExtractFeatures(const std::string& context, CodepointSpan input_span,
152 std::vector<CodepointSpan>* selection_label_spans) const;
186 CodepointSpan* span) const;
[all …]
Dtext-classification-model.cc46 int CountDigits(const std::string& str, CodepointSpan selection_indices) { in CountDigits()
61 CodepointSpan TextClassificationModel::StripPunctuation( in StripPunctuation()
62 CodepointSpan selection, const std::string& context) const { in StripPunctuation()
235 const std::string& context, CodepointSpan span, in InferInternal()
238 std::vector<CodepointSpan>* selection_label_spans) const { in InferInternal()
272 CodepointSpan TextClassificationModel::SuggestSelection( in SuggestSelection()
273 const std::string& context, CodepointSpan click_indices) const { in SuggestSelection()
295 CodepointSpan result; in SuggestSelection()
312 std::pair<CodepointSpan, float> BestSelectionSpan( in BestSelectionSpan()
313 CodepointSpan original_click_indices, const std::vector<float>& scores, in BestSelectionSpan()
[all …]
Dfeature-processor.cc64 void SplitTokensOnSelectionBoundaries(CodepointSpan selection, in SplitTokensOnSelectionBoundaries()
135 void StripTokensFromOtherLines(const std::string& context, CodepointSpan span, in StripTokensFromOtherLines()
229 *span = CodepointSpan({kInvalidIndex, kInvalidIndex}); in LabelToSpan()
231 *span = CodepointSpan({result_begin_codepoint, result_end_codepoint}); in LabelToSpan()
306 CodepointSpan codepoint_span) { in CodepointSpanToTokenSpan()
325 CodepointSpan TokenSpanToCodepointSpan( in TokenSpanToCodepointSpan()
335 CodepointSpan codepoint_span) { in FindTokenThatContainsSpan()
352 int CenterTokenFromClick(CodepointSpan span, in CenterTokenFromClick()
380 CodepointSpan span, const std::vector<Token>& selectable_tokens) { in CenterTokenFromMiddleOfSelection()
396 int FeatureProcessor::FindCenterToken(CodepointSpan span, in FindCenterToken()
[all …]
Dtypes.h37 using CodepointSpan = std::pair<CodepointIndex, CodepointIndex>; variable
67 bool IsContainedInSpan(CodepointSpan span) const { in IsContainedInSpan()
/external/libtextclassifier/
Dtextclassifier_jni.cc95 using libtextclassifier::CodepointSpan;
99 CodepointSpan ConvertIndicesBMPUTF8(const std::string& utf8_str, in ConvertIndicesBMPUTF8()
100 CodepointSpan orig_indices, in ConvertIndicesBMPUTF8()
118 CodepointSpan result{-1, -1}; in ConvertIndicesBMPUTF8()
146 CodepointSpan ConvertIndicesBMPToUTF8(const std::string& utf8_str, in ConvertIndicesBMPToUTF8()
147 CodepointSpan orig_indices) { in ConvertIndicesBMPToUTF8()
151 CodepointSpan ConvertIndicesUTF8ToBMP(const std::string& utf8_str, in ConvertIndicesUTF8ToBMP()
152 CodepointSpan orig_indices) { in ConvertIndicesUTF8ToBMP()
160 using libtextclassifier::CodepointSpan;
178 CodepointSpan input_indices = in Java_android_view_textclassifier_SmartSelection_nativeSuggest()
[all …]
Dtextclassifier_jni.h84 libtextclassifier::CodepointSpan ConvertIndicesBMPToUTF8(
85 const std::string& utf8_str, libtextclassifier::CodepointSpan bmp_indices);
89 libtextclassifier::CodepointSpan ConvertIndicesUTF8ToBMP(
90 const std::string& utf8_str, libtextclassifier::CodepointSpan utf8_indices);
/external/libtextclassifier/tests/
Dfeature-processor_test.cc111 const CodepointSpan span = {0, 5}; in TEST()
129 const CodepointSpan span = {18, 22}; in TEST()
147 const CodepointSpan span = {24, 33}; in TEST()
165 const CodepointSpan span = {18, 22}; in TEST()
183 const CodepointSpan span = {5, 23}; in TEST()