MLKitEntityExtraction Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
MLKDateTimeGranularity
enum MLKDateTimeGranularity {}
@enum DateTimeGranularity
The precision of a timestamp that was extracted from text.
For example, “tomorrow” has the granularity .day
, while “12:51” has the granularity .minute
.
-
The granularity of the DateTimeEntity
is unknown.
Declaration
Objective-C
MLKDateTimeGranularityUnknown = 0
-
The DateTimeEntity
is precise to a specific year.
Declaration
Objective-C
MLKDateTimeGranularityYear
-
The DateTimeEntity
is precise to a specific month.
Declaration
Objective-C
MLKDateTimeGranularityMonth
-
The DateTimeEntity
is precise to a specific week.
Declaration
Objective-C
MLKDateTimeGranularityWeek
-
The DateTimeEntity
is precise to a specific day.
Declaration
Objective-C
MLKDateTimeGranularityDay
-
The DateTimeEntity
is precise to a specific hour.
Declaration
Objective-C
MLKDateTimeGranularityHour
-
The DateTimeEntity
is precise to a specific minute.
Declaration
Objective-C
MLKDateTimeGranularityMinute
-
The DateTimeEntity
is precise to a specific second.
Declaration
Objective-C
MLKDateTimeGranularitySecond
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["`MLKDateTimeGranularity` is an enum defining the precision of a timestamp extracted from text."],["The granularity levels range from unknown to year, month, week, day, hour, minute, and second."],["Each granularity level indicates the specific unit of time to which a `DateTimeEntity` is precise."],["Examples of granularity include \"tomorrow\" having a `.day` granularity and \"12:51\" having a `.minute` granularity."],["This enum helps developers understand the level of detail associated with a detected date or time."]]],["`MLKDateTimeGranularity` defines the precision of a timestamp extracted from text. Granularity can be unknown (`MLKDateTimeGranularityUnknown`), or specific to a year, month, week, day, hour, minute, or second. Each granularity level, such as `MLKDateTimeGranularityDay`, indicates the precision of the extracted date/time. For example, \"tomorrow\" is a `day` while \"12:51\" is a `minute`. These are represented by numerical values in Objective-C declarations.\n"]]