/external/libtextclassifier/native/utils/flatbuffers/ |
D | mutable_test.cc | 59 std::unique_ptr<test::EntityDataT> entity_data = in TEST_F() local 61 ASSERT_NE(entity_data, nullptr); in TEST_F() 62 EXPECT_EQ(entity_data->an_int_field, 42); in TEST_F() 63 EXPECT_EQ(entity_data->a_long_field, 84); in TEST_F() 64 EXPECT_EQ(entity_data->a_bool_field, true); in TEST_F() 65 EXPECT_NEAR(entity_data->a_float_field, 1.f, 1e-4); in TEST_F() 66 EXPECT_NEAR(entity_data->a_double_field, 1.f, 1e-4); in TEST_F() 77 std::unique_ptr<test::EntityDataT> entity_data = in TEST_F() local 79 EXPECT_EQ(entity_data->enum_value, in TEST_F() 124 std::unique_ptr<test::EntityDataT> entity_data = in TEST_F() local [all …]
|
/external/libtextclassifier/native/actions/ |
D | utils.cc | 31 MutableFlatbuffer* entity_data, in FillSuggestionFromSpec() argument 43 TC3_CHECK_NE(entity_data, nullptr); in FillSuggestionFromSpec() 44 entity_data->MergeFromSerializedFlatbuffer( in FillSuggestionFromSpec() 48 if (action->entity_data() != nullptr) { in FillSuggestionFromSpec() 49 TC3_CHECK_NE(entity_data, nullptr); in FillSuggestionFromSpec() 50 entity_data->MergeFrom( in FillSuggestionFromSpec() 51 reinterpret_cast<const flatbuffers::Table*>(action->entity_data())); in FillSuggestionFromSpec() 54 if (entity_data != nullptr && entity_data->HasExplicitlySetFields()) { in FillSuggestionFromSpec() 55 suggestion->serialized_entity_data = entity_data->Serialize(); in FillSuggestionFromSpec() 68 std::unique_ptr<MutableFlatbuffer> entity_data = in SuggestTextRepliesFromCapturingMatch() local [all …]
|
D | grammar-actions_test.cc | 405 std::unique_ptr<MutableFlatbuffer> entity_data = in TEST_F() local 407 entity_data->Set("person", "Kenobi"); in TEST_F() 409 entity_data->Serialize(); in TEST_F() 410 action_grammar_rules.actions[spec_id]->action->entity_data.reset( in TEST_F() 412 action_grammar_rules.actions[spec_id]->action->entity_data->text = in TEST_F() 459 std::unique_ptr<MutableFlatbuffer> entity_data = in TEST_F() local 461 entity_data->Set("person", "Kenobi"); in TEST_F() 463 entity_data->Serialize(); in TEST_F() 547 group->entity_data.reset(new ActionsEntityDataT); in TEST_F() 548 group->entity_data->text = "You are a bold one."; in TEST_F()
|
D | grammar-actions.cc | 64 std::unique_ptr<MutableFlatbuffer> entity_data = in InstantiateActionsFromMatch() local 86 entity_data.get())) { in InstantiateActionsFromMatch() 121 FillSuggestionFromSpec(action_spec->action(), entity_data.get(), in InstantiateActionsFromMatch()
|
D | regex-actions.cc | 212 std::unique_ptr<MutableFlatbuffer> entity_data = in SuggestActions() local 232 entity_data.get())) { in SuggestActions() 256 FillSuggestionFromSpec(action, entity_data.get(), &suggestion); in SuggestActions()
|
D | utils.h | 37 MutableFlatbuffer* entity_data,
|
D | types.h | 89 const ActionsEntityData* entity_data() const { in entity_data() function
|
D | actions-suggestions.cc | 833 std::unique_ptr<MutableFlatbuffer> entity_data = in FillSuggestionFromSpecWithEntityData() local 836 FillSuggestionFromSpec(spec, entity_data.get(), suggestion); in FillSuggestionFromSpecWithEntityData() 862 std::unique_ptr<MutableFlatbuffer> entity_data = in PopulateIntentTriggering() local 936 std::unique_ptr<MutableFlatbuffer> entity_data = in ReadModelOutput() local 1210 std::unique_ptr<MutableFlatbuffer> entity_data = in SuggestActionsFromAnnotation() local 1216 TC3_CHECK_NE(entity_data, nullptr); in SuggestActionsFromAnnotation() 1228 entity_data->ParseAndSet(mapping->entity_field(), in SuggestActionsFromAnnotation() 1233 FillSuggestionFromSpec(mapping->action(), entity_data.get(), &suggestion); in SuggestActionsFromAnnotation()
|
D | actions_model.fbs | 321 entity_data:ActionsEntityData; 449 entity_data:ActionsEntityData;
|
D | actions-suggestions_test.cc | 918 std::unique_ptr<MutableFlatbuffer> entity_data = in TEST_F() local 920 entity_data->Set("person", "Kenobi"); in TEST_F() 921 action->serialized_entity_data = entity_data->Serialize(); in TEST_F()
|
/external/libtextclassifier/native/annotator/ |
D | flatbuffer-utils.cc | 67 EntityDataT entity_data; in CreateDatetimeSerializedEntityData() local 68 entity_data.datetime.reset(new EntityData_::DatetimeT()); in CreateDatetimeSerializedEntityData() 69 entity_data.datetime->time_ms_utc = parse_result.time_ms_utc; in CreateDatetimeSerializedEntityData() 70 entity_data.datetime->granularity = in CreateDatetimeSerializedEntityData() 88 entity_data.datetime->datetime_component.emplace_back( in CreateDatetimeSerializedEntityData() 91 return PackFlatbuffer<EntityData>(&entity_data); in CreateDatetimeSerializedEntityData()
|
D | annotator_test-include.cc | 68 const EntityData* entity_data = in ExpectFirstEntityIsMoney() local 70 ASSERT_NE(entity_data, nullptr); in ExpectFirstEntityIsMoney() 71 ASSERT_NE(entity_data->money(), nullptr); in ExpectFirstEntityIsMoney() 72 EXPECT_EQ(entity_data->money()->unnormalized_currency()->str(), currency); in ExpectFirstEntityIsMoney() 73 EXPECT_EQ(entity_data->money()->unnormalized_amount()->str(), amount); in ExpectFirstEntityIsMoney() 74 EXPECT_EQ(entity_data->money()->amount_whole_part(), whole_part); in ExpectFirstEntityIsMoney() 75 EXPECT_EQ(entity_data->money()->amount_decimal_part(), decimal_part); in ExpectFirstEntityIsMoney() 76 EXPECT_EQ(entity_data->money()->nanos(), nanos); in ExpectFirstEntityIsMoney() 2570 const EntityData* entity_data = in VerifyClassifyTextOutputsDatetimeEntityData() local 2572 ASSERT_NE(entity_data, nullptr); in VerifyClassifyTextOutputsDatetimeEntityData() [all …]
|
D | annotator.cc | 2520 pattern->entity_data() != nullptr) { in HasEntityData() 2529 group->entity_data() != nullptr) { in HasEntityData() 2546 std::unique_ptr<MutableFlatbuffer> entity_data = in SerializedEntityDataFromRegexMatch() local 2549 TC3_CHECK(entity_data != nullptr); in SerializedEntityDataFromRegexMatch() 2553 entity_data->MergeFromSerializedFlatbuffer( in SerializedEntityDataFromRegexMatch() 2557 if (pattern->entity_data() != nullptr) { in SerializedEntityDataFromRegexMatch() 2558 entity_data->MergeFrom( in SerializedEntityDataFromRegexMatch() 2559 reinterpret_cast<const flatbuffers::Table*>(pattern->entity_data())); in SerializedEntityDataFromRegexMatch() 2577 entity_data->MergeFromSerializedFlatbuffer( in SerializedEntityDataFromRegexMatch() 2581 if (group->entity_data() != nullptr) { in SerializedEntityDataFromRegexMatch() [all …]
|
D | model.fbs | 227 entity_data:EntityData; 263 entity_data:EntityData; 409 entity_data:EntityData;
|
D | types.h | 454 const EntityData* entity_data() const { in entity_data() function
|
/external/libtextclassifier/native/annotator/grammar/ |
D | grammar-annotator.cc | 144 std::unique_ptr<MutableFlatbuffer> entity_data = in InstantiateClassificationFromDerivation() local 147 entity_data->MergeFromSerializedFlatbuffer( in InstantiateClassificationFromDerivation() 151 if (interpretation->entity_data() != nullptr) { in InstantiateClassificationFromDerivation() 152 entity_data->MergeFrom(reinterpret_cast<const flatbuffers::Table*>( in InstantiateClassificationFromDerivation() 153 interpretation->entity_data())); in InstantiateClassificationFromDerivation() 172 entity_data->MergeFromSerializedFlatbuffer( in InstantiateClassificationFromDerivation() 186 if (!entity_data->ParseAndSet(group->entity_field_path(), in InstantiateClassificationFromDerivation() 195 if (entity_data && entity_data->HasExplicitlySetFields()) { in InstantiateClassificationFromDerivation() 196 classification->serialized_entity_data = entity_data->Serialize(); in InstantiateClassificationFromDerivation()
|
D | grammar-annotator_test.cc | 368 std::unique_ptr<MutableFlatbuffer> entity_data = in TEST_F() local 370 entity_data->Set("person", "Former President Barack Obama"); in TEST_F() 372 ->serialized_entity_data = entity_data->Serialize(); in TEST_F()
|
/external/libtextclassifier/native/utils/testing/ |
D | annotator.cc | 81 std::unique_ptr<MutableFlatbuffer> entity_data = in AddTestRegexModel() local 83 entity_data->Set("is_alive", true); in AddTestRegexModel() 84 pattern->serialized_entity_data = entity_data->Serialize(); in AddTestRegexModel() 105 std::unique_ptr<MutableFlatbuffer> entity_data = in AddTestRegexModel() local 107 entity_data->Set("former_us_president", true); in AddTestRegexModel() 109 entity_data->Serialize(); in AddTestRegexModel()
|
/external/libtextclassifier/native/annotator/translate/ |
D | translate_test.cc | 83 const EntityData* entity_data = in TEST_F() local 86 entity_data->translate()->language_prediction_results(); in TEST_F() 100 const EntityData* entity_data = in TEST_F() local 103 entity_data->translate()->language_prediction_results(); in TEST_F()
|
D | translate.cc | 83 EntityDataT entity_data; in CreateSerializedEntityData() local 84 entity_data.translate.reset(new EntityData_::TranslateT()); in CreateSerializedEntityData() 92 entity_data.translate->language_prediction_results.emplace_back( in CreateSerializedEntityData() 96 FinishEntityDataBuffer(builder, EntityData::Pack(builder, &entity_data)); in CreateSerializedEntityData()
|