Home
last modified time | relevance | path

Searched refs:unilib (Results 1 – 25 of 57) sorted by relevance

123

/external/libtextclassifier/native/annotator/
Dstrip-unpaired-brackets.cc29 const UniLib& unilib) { in StripUnpairedBrackets() argument
37 const char32 paired_begin_char = unilib.GetPairedBracket(begin_char); in StripUnpairedBrackets()
39 if (!unilib.IsOpeningBracket(begin_char) || in StripUnpairedBrackets()
51 const char32 paired_end_char = unilib.GetPairedBracket(end_char); in StripUnpairedBrackets()
53 if (!unilib.IsClosingBracket(end_char) || in StripUnpairedBrackets()
70 CodepointSpan span, const UniLib& unilib) { in StripUnpairedBrackets() argument
77 unilib); in StripUnpairedBrackets()
81 CodepointSpan span, const UniLib& unilib) { in StripUnpairedBrackets() argument
83 span, unilib); in StripUnpairedBrackets()
Dannotator_test-include.h41 const UniLib* unilib, const CalendarLib* calendarlib,
47 unilib, calendarlib);
51 const char* buffer, int size, const UniLib* unilib = nullptr,
57 Annotator::FromUnownedBuffer(buffer, size, unilib, calendarlib)
Dstrip-unpaired-brackets.h33 const UniLib& unilib);
37 CodepointSpan span, const UniLib& unilib);
41 CodepointSpan span, const UniLib& unilib);
Dannotator.h111 const char* buffer, int size, const UniLib* unilib = nullptr,
115 const std::string& buffer, const UniLib* unilib = nullptr,
119 std::unique_ptr<ScopedMmap>* mmap, const UniLib* unilib = nullptr,
122 std::unique_ptr<ScopedMmap>* mmap, std::unique_ptr<UniLib> unilib,
125 int fd, int offset, int size, const UniLib* unilib = nullptr,
128 int fd, int offset, int size, std::unique_ptr<UniLib> unilib,
131 int fd, const UniLib* unilib = nullptr,
134 int fd, std::unique_ptr<UniLib> unilib,
137 const std::string& path, const UniLib* unilib = nullptr,
140 const std::string& path, std::unique_ptr<UniLib> unilib,
[all …]
Dfeature-processor.h45 const UniLib* unilib);
109 const UniLib* unilib) in FeatureProcessor() argument
111 unilib), in FeatureProcessor()
113 tokenizer_(internal::BuildTokenizer(options, unilib)) { in FeatureProcessor()
/external/libtextclassifier/native/utils/
Dnormalization.cc24 UnicodeText NormalizeText(const UniLib& unilib, in NormalizeText() argument
28 unilib, normalization_options->codepointwise_normalization(), text); in NormalizeText()
31 UnicodeText NormalizeTextCodepointWise(const UniLib& unilib, in NormalizeTextCodepointWise() argument
45 unilib.IsWhitespace(codepoint)) { in NormalizeTextCodepointWise()
53 unilib.IsPunctuation(codepoint)) { in NormalizeTextCodepointWise()
62 normalized_codepoint = unilib.ToLower(normalized_codepoint); in NormalizeTextCodepointWise()
67 normalized_codepoint = unilib.ToUpper(normalized_codepoint); in NormalizeTextCodepointWise()
Dtokenizer.h53 const TokenizationType type, const UniLib* unilib,
62 const TokenizationType type, const UniLib* unilib, in Tokenizer() argument
68 : Tokenizer(type, unilib, codepoint_ranges, in Tokenizer()
Dnormalization.h30 UnicodeText NormalizeText(const UniLib& unilib,
37 UnicodeText NormalizeTextCodepointWise(const UniLib& unilib,
Dtoken-feature-extractor.cc51 const UniLib& unilib, UnicodeText* remapped) { in RemapTokenUnicode() argument
60 if (options.remap_digits && unilib.IsDigit(*it)) { in RemapTokenUnicode()
63 remapped->push_back(unilib.ToLower(*it)); in RemapTokenUnicode()
73 const TokenFeatureExtractorOptions& options, const UniLib* unilib) in TokenFeatureExtractor() argument
74 : options_(options), unilib_(*unilib) { in TokenFeatureExtractor()
/external/libtextclassifier/native/annotator/duration/
Dduration.h51 const UniLib* unilib);
57 const UniLib* unilib);
69 const UniLib* unilib) in DurationAnnotator() argument
72 unilib_(unilib), in DurationAnnotator()
74 internal::BuildTokenToDurationUnitMapping(options, unilib)), in DurationAnnotator()
76 internal::BuildStringSet(options->filler_expressions(), unilib)), in DurationAnnotator()
78 internal::BuildStringSet(options->half_expressions(), unilib)), in DurationAnnotator()
Dduration.cc36 std::string ToLowerString(const std::string& str, const UniLib* unilib) { in ToLowerString() argument
37 return unilib->ToLowerText(UTF8ToUnicodeText(str, /*do_copy=*/false)) in ToLowerString()
46 const UniLib* unilib) { in FillDurationUnitMap() argument
52 (*target_map)[ToLowerString(expression_string->c_str(), unilib)] = in FillDurationUnitMap()
59 const DurationAnnotatorOptions* options, const UniLib* unilib) { in BuildTokenToDurationUnitMapping() argument
62 unilib); in BuildTokenToDurationUnitMapping()
64 unilib); in BuildTokenToDurationUnitMapping()
66 unilib); in BuildTokenToDurationUnitMapping()
68 &mapping, unilib); in BuildTokenToDurationUnitMapping()
70 &mapping, unilib); in BuildTokenToDurationUnitMapping()
[all …]
/external/libtextclassifier/native/actions/
Dactions-suggestions.h54 const uint8_t* buffer, const int size, const UniLib* unilib = nullptr,
61 const UniLib* unilib = nullptr,
66 std::unique_ptr<UniLib> unilib,
74 const UniLib* unilib = nullptr,
79 std::unique_ptr<UniLib> unilib,
84 const int fd, const UniLib* unilib = nullptr,
88 const int fd, std::unique_ptr<UniLib> unilib,
93 const std::string& path, const UniLib* unilib = nullptr,
97 const std::string& path, std::unique_ptr<UniLib> unilib,
152 void SetOrCreateUnilib(const UniLib* unilib);
Dfeature-processor.cc46 const ActionsTokenizerOptions* options, const UniLib* unilib) { in CreateTokenizer() argument
64 options->type(), unilib, codepoint_config, internal_codepoint_config, in CreateTokenizer()
69 const ActionsTokenFeatureProcessorOptions* options, const UniLib* unilib) in ActionsFeatureProcessor() argument
71 tokenizer_(CreateTokenizer(options->tokenizer_options(), unilib)), in ActionsFeatureProcessor()
73 unilib) {} in ActionsFeatureProcessor()
Dutils.cc77 const UniLib& unilib, in NormalizeMatchText() argument
80 return NormalizeMatchText(unilib, group, in NormalizeMatchText()
85 const UniLib& unilib, in NormalizeMatchText() argument
91 return NormalizeText(unilib, group->normalization_options(), match_text); in NormalizeMatchText()
Dgrammar-actions.cc29 const UniLib* unilib, const RulesModel_::GrammarRules* grammar_rules, in GrammarActions() argument
32 : unilib_(*unilib), in GrammarActions()
34 tokenizer_(CreateTokenizer(grammar_rules->tokenizer_options(), unilib)), in GrammarActions()
36 analyzer_(unilib, grammar_rules->rules(), tokenizer_.get()), in GrammarActions()
Dactions-suggestions.cc113 const uint8_t* buffer, const int size, const UniLib* unilib, in FromUnownedBuffer() argument
121 actions->SetOrCreateUnilib(unilib); in FromUnownedBuffer()
131 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap, const UniLib* unilib, in FromScopedMmap() argument
147 actions->SetOrCreateUnilib(unilib); in FromScopedMmap()
158 std::unique_ptr<UniLib> unilib, in FromScopedMmap() argument
174 actions->owned_unilib_ = std::move(unilib); in FromScopedMmap()
185 const int fd, const int offset, const int size, const UniLib* unilib, in FromFileDescriptor() argument
193 return FromScopedMmap(std::move(mmap), unilib, in FromFileDescriptor()
199 std::unique_ptr<UniLib> unilib, in FromFileDescriptor() argument
207 return FromScopedMmap(std::move(mmap), std::move(unilib), in FromFileDescriptor()
[all …]
Dngram-model.cc64 const UniLib* unilib, const NGramLinearRegressionModel* model, in Create() argument
74 new NGramSensitiveModel(unilib, model, tokenizer)); in Create()
78 const UniLib* unilib, const NGramLinearRegressionModel* model, in NGramSensitiveModel() argument
84 owned_tokenizer_ = CreateTokenizer(model->tokenizer_options(), unilib); in NGramSensitiveModel()
Dfeature-processor.h34 const ActionsTokenizerOptions* options, const UniLib* unilib);
40 const ActionsTokenFeatureProcessorOptions* options, const UniLib* unilib);
/external/libtextclassifier/native/utils/grammar/
Danalyzer.cc24 Analyzer::Analyzer(const UniLib* unilib, const RulesSet* rules_set) in Analyzer() argument
27 unilib, in Analyzer()
33 parser_(unilib, rules_set),
39 Analyzer::Analyzer(const UniLib* unilib, const RulesSet* rules_set, in Analyzer() argument
42 parser_(unilib, rules_set), in Analyzer()
Danalyzer.h36 explicit Analyzer(const UniLib* unilib, const RulesSet* rules_set);
37 explicit Analyzer(const UniLib* unilib, const RulesSet* rules_set,
/external/libtextclassifier/native/utils/grammar/parsing/
Dmatcher.h57 explicit Matcher(const UniLib* unilib, const RulesSet* rules, in Matcher() argument
60 : unilib_(*unilib), in Matcher()
70 explicit Matcher(const UniLib* unilib, const RulesSet* rules, in Matcher() argument
72 : Matcher(unilib, rules, {}, arena) { in Matcher()
/external/libtextclassifier/native/utils/zlib/
Dzlib_regex.cc28 const UniLib& unilib, const flatbuffers::String* uncompressed_pattern, in UncompressMakeRegexPattern() argument
60 regex_pattern = unilib.CreateLazyRegexPattern(unicode_regex_pattern); in UncompressMakeRegexPattern()
62 regex_pattern = unilib.CreateRegexPattern(unicode_regex_pattern); in UncompressMakeRegexPattern()
/external/libtextclassifier/native/annotator/vocab/
Dvocab-annotator-impl.cc30 const FeatureProcessor& feature_processor, const UniLib& unilib, in VocabAnnotator() argument
35 unilib_(unilib), in VocabAnnotator()
40 const UniLib& unilib) { in Create() argument
57 feature_processor, unilib, model)); in Create()
/external/libtextclassifier/native/annotator/number/
Dnumber.h41 const UniLib* unilib) in NumberAnnotator() argument
43 unilib_(unilib), in NumberAnnotator()
44 tokenizer_(Tokenizer(TokenizationType_LETTER_DIGIT, unilib, in NumberAnnotator()
/external/libtextclassifier/native/annotator/pod_ner/
Dpod-ner-impl.h38 const UniLib &unilib);
55 explicit PodNerAnnotator(const UniLib &unilib) : unilib_(unilib) {} in PodNerAnnotator() argument

123