MLKitEntityExtraction Framework Reference

  • 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

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.