Home
last modified time | relevance | path

Searched refs:DateParseData (Results 1 – 11 of 11) sorted by relevance

/external/libtextclassifier/utils/calendar/
Dcalendar-common.h40 bool InterpretParseData(const DateParseData& parse_data,
47 DatetimeGranularity GetGranularity(const DateParseData& data) const;
52 bool ApplyRelationField(const DateParseData& parse_data,
67 bool AdjustByRelation(DateParseData::RelationType relation_type, int distance,
73 const DateParseData& parse_data, int64 reference_time_ms_utc, in InterpretParseData()
84 if (parse_data.field_set_mask & DateParseData::Fields::ZONE_OFFSET_FIELD) { in InterpretParseData()
88 if (parse_data.field_set_mask & DateParseData::Fields::DST_OFFSET_FIELD) { in InterpretParseData()
92 if (parse_data.field_set_mask & DateParseData::Fields::RELATION_FIELD) { in InterpretParseData()
98 DateParseData::Fields::RELATION_DISTANCE_FIELD) { in InterpretParseData()
109 if (parse_data.field_set_mask & DateParseData::Fields::YEAR_FIELD) { in InterpretParseData()
[all …]
Dcalendar_test-include.cc27 DateParseData{/*field_set_mask=*/0, /*year=*/0, /*month=*/0, in TEST_F()
29 /*ampm=*/static_cast<DateParseData::AMPM>(0), in TEST_F()
31 static_cast<DateParseData::Relation>(0), in TEST_F()
32 static_cast<DateParseData::RelationType>(0), in TEST_F()
41 DateParseData data; in TEST_F()
44 data.field_set_mask = DateParseData::YEAR_FIELD; in TEST_F()
61 DateParseData data; in TEST_F()
64 data.field_set_mask = DateParseData::YEAR_FIELD; in TEST_F()
72 data.field_set_mask |= DateParseData::MONTH_FIELD; in TEST_F()
80 data.field_set_mask |= DateParseData::DAY_FIELD; in TEST_F()
[all …]
Dcalendar-javaicu.cc71 static_cast<int>(DateParseData::RelationType::SUNDAY) || in Initialize()
73 static_cast<int>(DateParseData::RelationType::MONDAY) || in Initialize()
75 static_cast<int>(DateParseData::RelationType::TUESDAY) || in Initialize()
77 static_cast<int>(DateParseData::RelationType::WEDNESDAY) || in Initialize()
79 static_cast<int>(DateParseData::RelationType::THURSDAY) || in Initialize()
81 static_cast<int>(DateParseData::RelationType::FRIDAY) || in Initialize()
83 static_cast<int>(DateParseData::RelationType::SATURDAY)) { in Initialize()
Dcalendar-javaicu.h70 bool InterpretParseData(const DateParseData& parse_data, in InterpretParseData()
85 DatetimeGranularity GetGranularity(const DateParseData& data) const { in GetGranularity()
/external/libtextclassifier/annotator/datetime/
Dextractor.cc23 bool DatetimeExtractor::Extract(DateParseData* result, in Extract()
53 result->field_set_mask |= DateParseData::YEAR_FIELD; in Extract()
61 result->field_set_mask |= DateParseData::MONTH_FIELD; in Extract()
69 result->field_set_mask |= DateParseData::DAY_FIELD; in Extract()
77 result->field_set_mask |= DateParseData::HOUR_FIELD; in Extract()
85 result->field_set_mask |= DateParseData::MINUTE_FIELD; in Extract()
93 result->field_set_mask |= DateParseData::SECOND_FIELD; in Extract()
101 result->field_set_mask |= DateParseData::AMPM_FIELD; in Extract()
109 result->field_set_mask |= DateParseData::RELATION_DISTANCE_FIELD; in Extract()
117 result->field_set_mask |= DateParseData::RELATION_FIELD; in Extract()
[all …]
Dparser.cc349 const DateParseData& parse, in FillInterpretations()
350 std::vector<DateParseData>* interpretations) const { in FillInterpretations()
353 DateParseData modified_parse(parse); in FillInterpretations()
358 DateParseData::Fields::RELATION_FIELD) && in FillInterpretations()
360 DateParseData::Fields::RELATION_TYPE_FIELD)) { in FillInterpretations()
361 modified_parse.relation = DateParseData::Relation::NEXT_OR_SAME; in FillInterpretations()
362 modified_parse.field_set_mask |= DateParseData::Fields::RELATION_FIELD; in FillInterpretations()
368 (modified_parse.field_set_mask & DateParseData::Fields::HOUR_FIELD) && in FillInterpretations()
370 !(modified_parse.field_set_mask & DateParseData::Fields::AMPM_FIELD)) { in FillInterpretations()
373 interpretations->back().field_set_mask |= DateParseData::Fields::AMPM_FIELD; in FillInterpretations()
[all …]
Dextractor.h61 bool Extract(DateParseData* result, CodepointSpan* result_span) const;
90 DateParseData::AMPM* parsed_ampm) const;
92 DateParseData::Relation* parsed_relation) const;
96 DateParseData::TimeUnit* parsed_time_unit) const;
99 DateParseData::RelationType* parsed_relation_type) const;
101 DateParseData::RelationType* parsed_weekday) const;
Dparser.h94 void FillInterpretations(const DateParseData& parse,
95 std::vector<DateParseData>* interpretations) const;
/external/libtextclassifier/annotator/
Dtypes.h305 struct DateParseData { struct
395 DateParseData() = default; argument
397 DateParseData(int field_set_mask, int year, int month, int day_of_month, in DateParseData() argument
419 const DateParseData& data);
Dtypes-test-util.h37 TC3_DECLARE_PRINT_OPERATOR(DateParseData)
Dtypes.cc85 const DateParseData& data) { in operator <<()