AttentionalEntitiesSemanticRoleId

GoogleApi.ContentWarehouse.V1.Model.AttentionalEntitiesSemanticRoleId


Table of Contents ▼

Jump to a specific part of the page:

Description

Uniquely identifies a semantic role. When this role corresponds to a slot in a registered user intent (see go/assistant-intent-catalog), then the SemanticRoleId maps precisely onto that slot in the intent catalog. However, not all semantic roles corresponds to such user intent slots.

Attributes List

This module has the following attributes (case-insensitive ascending order):

View Attributes

Attributes

  1. intentId (type: String.t, default: nil)
    - Semantic roles will be defined locally, within the context of a single task/feature. The |intent_id| is a unique identifier for such a local cluster. In most cases, this should be exactly the same as the name of the intent used for TaskState (see go/assistant-intent-catalog). In cases where the intent isn't well-defined, this can be an arbitrary, feature-defined identifier.
  2. roleId (type: String.t, default: nil)
    - Identifier for a semantic role, unique within the namespace of |intent_id|. When this role corresponds to a slot in the intent, the |role_id| should be equal to the name of that argument. For example, consider an entry in the intent catalog: core_intent { id { id: "BookARide" } slot { name: "provider" type { string_type { } } } slot { name: "num_riders" type { number_type { } } } } Then, the |role_id| would be "provider" or "num_riders" when referring to one of these slots. NOTE: when responding to the user, the Assistant may actually make use of other roles such as "ETA" or "driver" that are not part of the intent declaration. These should still be assigned consistent semantic roles. For example, a dialog with the Shopping feature: User: Where can I buy XYZ? Google: [Best Buy in Sunnyvale] has [XYZ] in stock. User: Great! Give me directions. In this case, both "Best Buy" and "XYZ" would be pushed to attentional entities. Best Buy, in this case, may not be an argument in the ShoppingItemStockInquiry intent, but should still have a consistent |role_id| such as "possessing_business".

Type

@type t() :: %GoogleApi.ContentWarehouse.V1.Model.AttentionalEntitiesSemanticRoleId{
intentId: String.t() | nil,
roleId: String.t() | nil
}

Function

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

Data sourced from HexDocs : GoogleApi.ContentWarehouse.V1.Model.AttentionalEntitiesSemanticRoleId