Home
last modified time | relevance | path

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

/external/libtextclassifier/
Dfeature-processor.h49 void SplitTokensOnSelectionBoundaries(CodepointSpan selection,
53 int CenterTokenFromClick(CodepointSpan span, const std::vector<Token>& tokens);
58 CodepointSpan span, const std::vector<Token>& selectable_tokens);
79 const std::vector<Token>& selectable_tokens, CodepointSpan codepoint_span,
83 CodepointSpan TokenSpanToCodepointSpan(
94 typedef std::map<CodepointSpan, std::vector<float>> EmbeddingCache;
152 CodepointSpan input_span,
158 CodepointSpan input_span,
170 CodepointSpan selection_span_for_feature,
180 std::vector<CodepointSpan>* selection_label_spans) const;
[all …]
Dstrip-unpaired-brackets.cc30 const CodepointSpan span) { in IsCodepointInSpan()
41 const CodepointSpan span) { in FirstSpanCodepoint()
49 const CodepointSpan span) { in LastSpanCodepoint()
57 CodepointSpan StripUnpairedBrackets(const std::string& context, in StripUnpairedBrackets()
58 CodepointSpan span, const UniLib& unilib) { in StripUnpairedBrackets()
67 CodepointSpan StripUnpairedBrackets(const UnicodeText& context_unicode, in StripUnpairedBrackets()
68 CodepointSpan span, const UniLib& unilib) { in StripUnpairedBrackets()
Dtext-classifier.h134 CodepointSpan SuggestSelection(
135 const std::string& context, CodepointSpan click_indices,
141 const std::string& context, CodepointSpan selection_indices,
221 CodepointSpan click_indices,
231 CodepointSpan selection_indices, InterpreterManager* interpreter_manager,
236 const std::string& context, CodepointSpan selection_indices,
249 CodepointSpan selection_indices,
255 CodepointSpan selection_indices,
364 CodepointSpan SnapLeftIfWhitespaceSelection(CodepointSpan span,
372 CodepointSpan selection_indices,
Dstrip-unpaired-brackets.h29 CodepointSpan StripUnpairedBrackets(const std::string& context,
30 CodepointSpan span, const UniLib& unilib);
33 CodepointSpan StripUnpairedBrackets(const UnicodeText& context_unicode,
34 CodepointSpan span, const UniLib& unilib);
Dfeature-processor.cc62 void SplitTokensOnSelectionBoundaries(CodepointSpan selection, in SplitTokensOnSelectionBoundaries()
127 const std::string& context, CodepointSpan span, in StripTokensFromOtherLines()
135 const UnicodeText& context_unicode, CodepointSpan span, in StripTokensFromOtherLines()
231 *span = CodepointSpan({kInvalidIndex, kInvalidIndex}); in LabelToSpan()
251 *span = CodepointSpan({result_begin_codepoint + begin_ignored, in LabelToSpan()
343 CodepointSpan codepoint_span, in CodepointSpanToTokenSpan()
369 CodepointSpan TokenSpanToCodepointSpan( in TokenSpanToCodepointSpan()
379 CodepointSpan codepoint_span) { in FindTokenThatContainsSpan()
396 int CenterTokenFromClick(CodepointSpan span, in CenterTokenFromClick()
424 CodepointSpan span, const std::vector<Token>& selectable_tokens) { in CenterTokenFromMiddleOfSelection()
[all …]
Dtextclassifier_jni.cc36 using libtextclassifier2::CodepointSpan;
48 using libtextclassifier2::CodepointSpan;
190 CodepointSpan ConvertIndicesBMPUTF8(const std::string& utf8_str, in ConvertIndicesBMPUTF8()
191 CodepointSpan orig_indices, in ConvertIndicesBMPUTF8()
209 CodepointSpan result{-1, -1}; in ConvertIndicesBMPUTF8()
237 CodepointSpan ConvertIndicesBMPToUTF8(const std::string& utf8_str, in ConvertIndicesBMPToUTF8()
238 CodepointSpan bmp_indices) { in ConvertIndicesBMPToUTF8()
242 CodepointSpan ConvertIndicesUTF8ToBMP(const std::string& utf8_str, in ConvertIndicesUTF8ToBMP()
243 CodepointSpan utf8_indices) { in ConvertIndicesUTF8ToBMP()
370 CodepointSpan input_indices = in JNI_METHOD()
[all …]
Dtypes.h45 using CodepointSpan = std::pair<CodepointIndex, CodepointIndex>; variable
47 inline bool SpansOverlap(const CodepointSpan& a, const CodepointSpan& b) { in SpansOverlap()
51 inline bool ValidNonEmptySpan(const CodepointSpan& span) { in ValidNonEmptySpan()
142 bool IsContainedInSpan(CodepointSpan span) const { in IsContainedInSpan()
195 CodepointSpan span;
264 CodepointSpan span = {kInvalidIndex, kInvalidIndex};
Dtextclassifier_jni.h123 libtextclassifier2::CodepointSpan ConvertIndicesBMPToUTF8(
124 const std::string& utf8_str, libtextclassifier2::CodepointSpan bmp_indices);
128 libtextclassifier2::CodepointSpan ConvertIndicesUTF8ToBMP(
130 libtextclassifier2::CodepointSpan utf8_indices);
Dtext-classifier.cc327 int CountDigits(const std::string& str, CodepointSpan selection_indices) { in CountDigits()
341 CodepointSpan selection_indices) { in ExtractSelection()
356 CodepointSpan SnapLeftIfWhitespaceSelection(CodepointSpan span, in SnapLeftIfWhitespaceSelection()
372 CodepointSpan result; in SnapLeftIfWhitespaceSelection()
413 CodepointSpan TextClassifier::SuggestSelection( in SuggestSelection()
414 const std::string& context, CodepointSpan click_indices, in SuggestSelection()
416 CodepointSpan original_click_indices = click_indices; in SuggestSelection()
530 CodepointSpan conflicting_span = candidates[start_index].span; in FirstNonOverlappingSpanIndex()
649 const UnicodeText& context_unicode, CodepointSpan click_indices, in ModelSuggestSelection()
753 const std::string& context, CodepointSpan selection_indices, in ModelClassifyText()
[all …]
Dfeature-processor_test.cc173 const CodepointSpan span = {0, 5}; in TEST()
199 const CodepointSpan span = {18, 22}; in TEST()
225 const CodepointSpan span = {24, 33}; in TEST()
251 const CodepointSpan span = {18, 22}; in TEST()
277 const CodepointSpan span = {5, 23}; in TEST()
Dtext-classifier_test.cc1070 AnnotatedSpan MakeAnnotatedSpan(CodepointSpan span, in MakeAnnotatedSpan()
/external/libtextclassifier/datetime/
Dextractor.h61 bool Extract(DateParseData* result, CodepointSpan* result_span) const;
76 bool UpdateMatchSpan(int group_id, CodepointSpan* span) const;
Dextractor.cc24 CodepointSpan* result_span) const { in Extract()
203 CodepointSpan* span) const { in UpdateMatchSpan()
Dparser.h91 CodepointSpan* result_span) const;
Dparser.cc385 CodepointSpan* result_span) const { in ExtractDatetime()