MLKitEntityExtraction Framework Reference

  • DateTimeGranularity is an enum that defines the precision of a timestamp extracted from text.

  • It specifies how precise a DateTimeEntity is, ranging from unknown to specific seconds.

  • Examples of granularity include 'day' for "tomorrow" and 'minute' for "12:51".

  • This enum is crucial for understanding the level of detail associated with extracted time information.

DateTimeGranularity

enum DateTimeGranularity : Int

@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.