NlpSemanticParsingDatetimeFetchedRelativeDateTime

AI Overview😉

  • The potential purpose of this module is to understand and process natural language queries related to dates and times, allowing Google to better comprehend user searches and provide more accurate results. This module seems to focus on parsing and interpreting date and time-based queries, such as "next Monday" or "first Tuesday in April".
  • This module could impact search results by allowing Google to more accurately understand the intent behind user queries, particularly those related to dates and times. This could lead to more relevant and accurate search results, as well as improved functionality for features like Google Calendar and Google Maps.
  • To be more favorable to this function, a website could ensure that its content is structured in a way that makes it easy for Google to understand and parse date and time-based information. This could include using clear and consistent formatting for dates and times, as well as providing context for ambiguous or relative date and time references. Additionally, websites could optimize their content to answer common date and time-based queries, making it more likely to appear in search results for those queries.

Interesting Module? Vote 👇

Voting helps other researchers find interesting modules.

Current Votes: 0

GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeFetchedRelativeDateTime (google_api_content_warehouse v0.4.0)

For a more detailed presentation on what's a fetching operation, see go/datetime-meaning-schemas. Examples to illustrate how the proto is used: I. Fetching day-of-weeks: a) query: "1st 2 Mondays of April" proto: ordinal: 1 target {weekday: MONDAY} count: 2 range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} b) query: "1st and last Monday of April" proto: ordinal: 1 ordinal: -1 target {weekday: MONDAY} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} c) query: "next Monday" proto: ordinal: 1 target {weekday: MONDAY} d) query: "last 2 Mondays" proto: ordinal: -1 count: 2 target {weekday: MONDAY} e) query: "this Monday" proto: ordinal: 0 target {weekday: MONDAY} f) query: "the monday after next" proto: ordinal: 2 target {weekday: MONDAY} g) query: "third Monday in April" proto: ordinal: 3 target {weekday: MONDAY} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} h) query: "the monday before last" proto: ordinal: -2 target {weekday: MONDAY} i) query: "the second to the last monday in April" proto: ordinal: -2 target {weekday: MONDAY} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} II. Fetching date/time unit: a) query: "1st 2 weeks of April" proto: ordinal: 1 target {unit: WEEK} count: 2 range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} b) query: "1st and last week of April" proto: ordinal: 1 ordinal: -1 target {unit: WEEK} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} c) query: "next year" proto: ordinal: 1 target {unit: YEAR} d) query: "last 2 weeks" proto: ordinal: -1 count: 2 target {unit: WEEK} e) query: "this month" proto: ordinal: 0 target {unit: MONTH} f) query: "the week after next" proto: ordinal: 2 target {unit: WEEK} g) query: "third week in April" proto: ordinal: 3 target {unit: WEEK} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} h) query: "the week before last" proto: ordinal: -2 target {unit: WEEK} i) query: "the second to the last week in April" proto: ordinal: -2 target {unit: WEEK} range: {begin {year: RESOLVED_YEAR month: APRIL day: 1} {end {year: RESOLVED_YEAR month: APRIL day: 30} Next field: 9

Attributes

  • baseType (type: String.t, default: nil) -
  • count (type: integer(), default: nil) - How many to fetch (e.g. [next weekend] vs. [next two weeks])
  • metadata (type: String.t, default: nil) - Can be used to tag relative datetime expressions with metadata information in the grammar.
  • ordinal (type: list(integer()), default: nil) - Encodes expressions like next (+1), last (-1), after next (+2), this (0).
  • range (type: GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeRange.t, default: nil) - The restriction range on which fetching is operated, e.g., "April" in "first Tuesday in/of April." If this field is missing, the operation is done relative to the base_type (or if not given, to the query's reference datetime). When the fetching operation is performed relative to a reference time point, positive ordinal values represent upcoming instances from the reference point, negative ordinal values represent previous instances from the reference point. Similarly, ordinal=0 represents a reference to the "current instance", which may vary depending on the target. E.g. "this week" is simply defined as the week range that contains the current reference time point, but "this " can be ambiguous and its resolution will depend on language/locale conventions ("this monday" in some languages refers to the closest upcoming instance of Monday, while in other languages it represents the Monday instance within the current week).
  • rangeModifier (type: String.t, default: nil) - Modifier that return the appropriate subrange. For more information, see the description of RangeOfDateTimeModifier. Example: early next week late next Monday
  • relativeRange (type: GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeResolutionProperties.t, default: nil) - If the underlying range comes from a relative datetime expression, encode the expression here instead.
  • target (type: GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeTargetToFetch.t, default: nil) - The target to be fetched. This could be a named day-of-week or month (e.g., "Monday", "April"), or a date/time unit (e.g., "day", "week", "month").

Summary

Types

t()

Functions

decode(value, options)

Unwrap a decoded JSON object into its complex fields.

Types

Link to this type

t()

@type t() ::
  %GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeFetchedRelativeDateTime{
    baseType: String.t() | nil,
    count: integer() | nil,
    metadata: String.t() | nil,
    ordinal: [integer()] | nil,
    range:
      GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeRange.t()
      | nil,
    rangeModifier: String.t() | nil,
    relativeRange:
      GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeResolutionProperties.t()
      | nil,
    target:
      GoogleApi.ContentWarehouse.V1.Model.NlpSemanticParsingDatetimeTargetToFetch.t()
      | nil
  }

Functions

Link to this function

decode(value, options)

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.