DateTimeEntity
Stay organized with collections
Save and categorize content based on your preferences.
A date-time entity extracted from a piece of text. It provides estimated values for the
date-time expressed in the text.
Nested Class Summary
@interface
The precision of a timestamp that was extracted
from text.
Inherited Constant Summary
Public Method Summary
int |
|
long |
getTimestampMillis
() The timestamp in milliseconds from the epoch of 1970-01-01T00:00:00Z (UTC
timezone).
|
Inherited Method Summary
From class java.lang.Object
Constants
public static final int
GRANULARITY_DAY
public static final int
GRANULARITY_HOUR
public static final int
GRANULARITY_MINUTE
public static final int
GRANULARITY_MONTH
public static final int
GRANULARITY_SECOND
public static final int
GRANULARITY_WEEK
public static final int
GRANULARITY_YEAR
Public Methods
public int
getDateTimeGranularity
()
public long
getTimestampMillis
()
The timestamp in milliseconds from the epoch of 1970-01-01T00:00:00Z (UTC
timezone).
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-10-31 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-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eDateTimeEntity\u003c/code\u003e extracts date and time information from text, providing estimated values for the identified date-time expressions.\u003c/p\u003e\n"],["\u003cp\u003eIt offers varying levels of granularity (year, month, week, day, hour, minute, second) for the extracted timestamp.\u003c/p\u003e\n"],["\u003cp\u003eThe extracted timestamp is represented in milliseconds since the epoch of 1970-01-01T00:00:00Z (UTC timezone).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDateTimeEntity\u003c/code\u003e is a subclass of \u003ccode\u003eEntity\u003c/code\u003e, inheriting properties and methods related to entity extraction in natural language processing.\u003c/p\u003e\n"]]],["`DateTimeEntity` extracts date-time information from text. Key actions include retrieving the timestamp in milliseconds via `getTimestampMillis()` and determining the timestamp's precision with `getDateTimeGranularity()`. Granularity constants range from `GRANULARITY_YEAR` to `GRANULARITY_SECOND`, defining the level of detail (e.g., year, month, day, hour). `DateTimeEntity` is a type of `Entity` that allows it to have different type such as `TYPE_DATE_TIME`, `TYPE_PHONE` etc. it has an interface `DateTimeGranularity` to manage the precision of the extracted timestamp.\n"],null,[]]