Home
last modified time | relevance | path

Searched refs:unilib_ (Results 1 – 25 of 61) sorted by relevance

123

/external/libtextclassifier/native/utils/utf8/
Dunilib_test-include.cc28 EXPECT_TRUE(unilib_->IsOpeningBracket('(')); in TEST_F()
29 EXPECT_TRUE(unilib_->IsClosingBracket(')')); in TEST_F()
30 EXPECT_FALSE(unilib_->IsWhitespace(')')); in TEST_F()
31 EXPECT_TRUE(unilib_->IsWhitespace(' ')); in TEST_F()
32 EXPECT_FALSE(unilib_->IsDigit(')')); in TEST_F()
33 EXPECT_TRUE(unilib_->IsDigit('0')); in TEST_F()
34 EXPECT_TRUE(unilib_->IsDigit('9')); in TEST_F()
35 EXPECT_FALSE(unilib_->IsUpper(')')); in TEST_F()
36 EXPECT_TRUE(unilib_->IsUpper('A')); in TEST_F()
37 EXPECT_TRUE(unilib_->IsUpper('Z')); in TEST_F()
[all …]
Dunilib_test-include.h29 UniLibTest() : unilib_(CreateUniLibForTesting()) {} in UniLibTest()
30 std::unique_ptr<UniLib> unilib_; variable
/external/libtextclassifier/native/annotator/
Dstrip-unpaired-brackets_test.cc26 StripUnpairedBracketsTest() : INIT_UNILIB_FOR_TESTING(unilib_) {} in StripUnpairedBracketsTest()
27 UniLib unilib_; member in libtextclassifier3::__anoncae555490111::StripUnpairedBracketsTest
32 EXPECT_EQ(StripUnpairedBrackets("call me (123) 456 today", {8, 17}, unilib_), in TEST_F()
34 EXPECT_EQ(StripUnpairedBrackets("call me (123 456) today", {8, 17}, unilib_), in TEST_F()
38 EXPECT_EQ(StripUnpairedBrackets("call me (123 456 today", {8, 16}, unilib_), in TEST_F()
40 EXPECT_EQ(StripUnpairedBrackets("call me )123 456 today", {8, 16}, unilib_), in TEST_F()
42 EXPECT_EQ(StripUnpairedBrackets("call me 123 456) today", {8, 16}, unilib_), in TEST_F()
44 EXPECT_EQ(StripUnpairedBrackets("call me 123 456( today", {8, 16}, unilib_), in TEST_F()
49 EXPECT_EQ(StripUnpairedBrackets("call me at ) today", {11, 12}, unilib_), in TEST_F()
51 EXPECT_EQ(StripUnpairedBrackets("call me at ( today", {11, 12}, unilib_), in TEST_F()
[all …]
Dannotator_test-include.cc81 Annotator::FromPath(GetModelPath() + "wrong_embeddings.fb", unilib_.get(), in TEST_F()
127 GetTestModelPath(), unilib_.get(), calendarlib_.get()); in TEST_F()
133 GetTestModelPath(), unilib_.get(), calendarlib_.get()); in TEST_F()
150 GetTestModelPath(), unilib_.get(), calendarlib_.get()); in TEST_F()
164 GetModelWithVocabPath(), unilib_.get(), calendarlib_.get()); in TEST_F()
196 builder.GetSize(), unilib_.get(), calendarlib_.get()); in TEST_F()
213 builder.GetSize(), unilib_.get(), calendarlib_.get()); in TEST_F()
225 test_model.c_str(), test_model.size(), unilib_.get(), calendarlib_.get()); in TEST_F()
243 builder.GetSize(), unilib_.get(), calendarlib_.get()); in TEST_F()
279 builder.GetSize(), unilib_.get(), calendarlib_.get()); in TEST_F()
[all …]
Dfeature-processor_test.cc82 AnnotatorFeatureProcessorTest() : INIT_UNILIB_FOR_TESTING(unilib_) {} in AnnotatorFeatureProcessorTest()
83 UniLib unilib_; member in libtextclassifier3::__anon4cfd18cf0111::AnnotatorFeatureProcessorTest
174 &unilib_); in TEST_F()
199 &unilib_); in TEST_F()
224 &unilib_); in TEST_F()
249 &unilib_); in TEST_F()
276 &unilib_); in TEST_F()
301 &unilib_); in TEST_F()
324 &unilib_); in TEST_F()
345 &unilib_); in TEST_F()
[all …]
Dannotator_test-include.h67 : unilib_(CreateUniLibForTesting()), in AnnotatorTest()
70 std::unique_ptr<UniLib> unilib_; variable
/external/libtextclassifier/native/annotator/pod_ner/
Dpod-ner-impl_test.cc94 unilib_ = CreateUniLibForTesting(); in PodNerTest()
101 std::unique_ptr<UniLib> unilib_; member in libtextclassifier3::__anonc842bf600111::PodNerTest
106 PodNerAnnotator::Create(model_, *unilib_); in TEST_F()
129 PodNerAnnotator::Create(model_, *unilib_); in TEST_F()
188 PodNerAnnotator::Create(model_, *unilib_); in TEST_F()
236 *unilib_); in TEST_F()
262 PodNerAnnotator::Create(model_, *unilib_); in TEST_F()
285 *unilib_); in TEST_F()
296 PodNerAnnotator::Create(model_, *unilib_); in TEST_F()
319 *unilib_); in TEST_F()
[all …]
/external/libtextclassifier/native/utils/
Dtoken-feature-extractor_test.cc27 explicit TokenFeatureExtractorTest() : INIT_UNILIB_FOR_TESTING(unilib_) {} in TokenFeatureExtractorTest()
28 UniLib unilib_; member in libtextclassifier3::__anon29dc82940111::TokenFeatureExtractorTest
44 TestingTokenFeatureExtractor extractor(options, &unilib_); in TEST_F()
114 TestingTokenFeatureExtractor extractor(options, &unilib_); in TEST_F()
143 TestingTokenFeatureExtractor extractor(options, &unilib_); in TEST_F()
213 TestingTokenFeatureExtractor extractor(options, &unilib_); in TEST_F()
244 TestingTokenFeatureExtractor extractor(options, &unilib_); in TEST_F()
278 TestingTokenFeatureExtractor extractor(options, &unilib_); in TEST_F()
302 TestingTokenFeatureExtractor extractor(options, &unilib_); in TEST_F()
326 TestingTokenFeatureExtractor extractor(options, &unilib_); in TEST_F()
[all …]
Dregex-match_test.cc32 RegexMatchTest() : unilib_(libtextclassifier3::CreateUniLibForTesting()) {} in RegexMatchTest()
33 std::unique_ptr<UniLib> unilib_; member in libtextclassifier3::__anonacc0a2260111::RegexMatchTest
68 unilib_->CreateRegexPattern(pattern); in TEST_F()
86 unilib_->CreateRegexPattern(pattern); in TEST_F()
Dtokenizer.cc37 unilib_(unilib), in Tokenizer()
237 unilib_->CreateBreakIterator(context_unicode); in ICUTokenize()
259 if (!unilib_->IsWhitespace(*char_it)) { in ICUTokenize()
320 if (unilib_->IsDigit(*it)) { in NumberTokenize()
322 } else if (unilib_->IsLetter(*it)) { in NumberTokenize()
324 } else if (unilib_->IsWhitespace(*it)) { in NumberTokenize()
327 } else if (unilib_->IsDot(*it) && preserve_floating_numbers_) { in NumberTokenize()
330 unilib_->IsDigit(*it_next)) { in NumberTokenize()
Dnormalization_test.cc34 NormalizationTest() : INIT_UNILIB_FOR_TESTING(unilib_) {} in NormalizationTest()
39 unilib_, codepointwise_ops, in NormalizeTextCodepointWise()
44 UniLib unilib_; member in libtextclassifier3::__anonb713a4580111::NormalizationTest
/external/libtextclassifier/native/utils/grammar/parsing/
Dparser_test.cc54 Parser parser(unilib_.get(), in TEST_F()
70 Parser parser(unilib_.get(), in TEST_F()
95 Parser parser(unilib_.get(), in TEST_F()
116 Parser parser(unilib_.get(), in TEST_F()
138 Parser parser(unilib_.get(), in TEST_F()
162 Parser parser(unilib_.get(), in TEST_F()
192 Parser parser(unilib_.get(), in TEST_F()
216 Parser parser(unilib_.get(), in TEST_F()
236 Parser parser(unilib_.get(), in TEST_F()
262 Parser parser(unilib_.get(), in TEST_F()
[all …]
Dmatcher_test.cc90 : INIT_UNILIB_FOR_TESTING(unilib_), arena_(/*block_size=*/16 << 10) {} in MatcherTest()
120 UniLib unilib_; member in libtextclassifier3::grammar::__anon3beddf6e0111::MatcherTest
137 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
194 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
229 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
253 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
282 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
318 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
330 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
362 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
[all …]
Dlexer_test.cc52 : unilib_(libtextclassifier3::CreateUniLibForTesting()), in LexerTest()
53 tokenizer_(TokenizationType_ICU, unilib_.get(), in LexerTest()
58 lexer_(unilib_.get()) {}
70 std::unique_ptr<UniLib> unilib_; member in libtextclassifier3::grammar::__anon5574d74a0111::LexerTest
Dlexer.h103 explicit Lexer(const UniLib* unilib) : unilib_(*unilib) {} in Lexer()
115 const UniLib& unilib_; variable
Dlexer.cc22 if (unilib_.IsPunctuation(*it)) { in GetSymbolType()
24 } else if (unilib_.IsDigit(*it)) { in GetSymbolType()
/external/libtextclassifier/native/annotator/number/
Dnumber.cc70 if (!unilib_->IsCJTletter(*char_it)) { in IsCJTterm()
96 if (token_length == 1 && unilib_->IsOpeningBracket(*prefix_begin_it) && in TokensAreValidNumberPrefix()
100 if (token_length == 1 && unilib_->IsNumberSign(*prefix_begin_it) && in TokensAreValidNumberPrefix()
104 if (token_length == 1 && unilib_->IsSlash(*prefix_begin_it) && in TokensAreValidNumberPrefix()
130 unilib_->IsPunctuation(*ending_begin_it)) { in TokensAreValidEnding()
135 unilib_->IsPunctuation(*ending_begin_it) && in TokensAreValidEnding()
161 if (token_length == 1 && unilib_->IsSlash(*suffix_begin_it) && in TokensAreValidNumberSuffix()
204 const bool is_double = unilib_->ParseDouble(token_text, parsed_double_value); in TryParseNumber()
228 !unilib_->IsDigit( in FindAll()
239 unilib_->IsMinus( in FindAll()
Dnumber_test-include.h30 : unilib_(CreateUniLibForTesting()), in NumberAnnotatorTest()
31 number_annotator_(TestingNumberAnnotatorOptions(), unilib_.get()) {} in NumberAnnotatorTest()
35 std::unique_ptr<UniLib> unilib_; variable
/external/libtextclassifier/native/actions/
Dfeature-processor_test.cc52 ActionsFeatureProcessorTest() : INIT_UNILIB_FOR_TESTING(unilib_) {} in ActionsFeatureProcessorTest()
62 UniLib unilib_; member in libtextclassifier3::__anonbe8aa34a0111::ActionsFeatureProcessorTest
75 &unilib_); in TEST_F()
95 &unilib_); in TEST_F()
116 &unilib_); in TEST_F()
Dactions-suggestions_test.cc76 explicit ActionsSuggestionsTest() : unilib_(CreateUniLibForTesting()) {} in ActionsSuggestionsTest()
80 unilib_.get()); in LoadTestModel()
84 unilib_.get()); in LoadHashGramTestModel()
88 GetModelPath() + kMultiTaskModelFileName, unilib_.get()); in LoadMultiTaskTestModel()
93 GetModelPath() + kMultiTaskSrP13nModelFileName, unilib_.get()); in LoadMultiTaskSrP13nTestModel()
95 std::unique_ptr<UniLib> unilib_; member in libtextclassifier3::__anon1e8f81aa0111::ActionsSuggestionsTest
196 builder.GetSize(), unilib_.get()); in TEST_F()
253 builder.GetSize(), unilib_.get()); in TEST_F()
321 builder.GetSize(), unilib_.get()); in TEST_F()
421 unilib_.get()); in TEST_F()
[all …]
Dgrammar-actions_test.cc61 : unilib_(CreateUniLibForTesting()), in GrammarActionsTest()
139 std::unique_ptr<UniLib> unilib_; member in libtextclassifier3::__anon7c60ce160111::GrammarActionsTest
165 TestGrammarActions grammar_actions(unilib_.get(), model.get()); in TEST_F()
212 TestGrammarActions grammar_actions(unilib_.get(), model.get()); in TEST_F()
260 TestGrammarActions grammar_actions(unilib_.get(), model.get()); in TEST_F()
308 TestGrammarActions grammar_actions(unilib_.get(), model.get()); in TEST_F()
376 TestGrammarActions grammar_actions(unilib_.get(), model.get()); in TEST_F()
425 TestGrammarActions grammar_actions(unilib_.get(), model.get(), in TEST_F()
505 TestGrammarActions grammar_actions(unilib_.get(), model.get(), in TEST_F()
562 TestGrammarActions grammar_actions(unilib_.get(), model.get(), in TEST_F()
[all …]
Dregex-actions.h37 : unilib_(*unilib), smart_reply_action_type_(smart_reply_action_type) {} in RegexActions()
79 const UniLib& unilib_; variable
/external/libtextclassifier/native/annotator/vocab/
Dvocab-annotator-impl.cc35 unilib_(unilib), in VocabAnnotator()
108 unilib_.ToLowerText(stripped_token).ToUTF8String(); in ClassifyTextInternal()
115 unilib_.IsUpper(*stripped_token.begin())) { in ClassifyTextInternal()
/external/libtextclassifier/native/annotator/translate/
Dtranslate.h35 : options_(options), langid_model_(langid_model), unilib_(unilib) {} in TranslateAnnotator()
76 const UniLib* unilib_; variable
/external/libtextclassifier/native/annotator/grammar/
Dtest-utils.h56 : unilib_(CreateUniLibForTesting()), in GrammarAnnotatorTest()
65 std::unique_ptr<UniLib> unilib_; variable

123