View Source GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersIntentQueryTokenSynonym (google_api_content_warehouse v0.4.0)

A TokenSynonym contains information about synonyms of a Token's ngram. The synonyms were the ones used during parsing for token explanation in place of the original ngrams. Example 1: [present population of nyc] We can generate interpretation kc:/location/statistical_region:population by converting "present" to its synonym "current", which is a context phrase for the intent. The ngram for this token would be "present" and the string "current" would be stored in synonym_ngram. Example 2: [nys important cities] We can generate interpretation kc:/location/us_state:cities by converting "important" to its synonym "major" or its synonym "biggest", because both "major cities" and "biggest cities" are attribute phrases for the intent. In this case, the ngram in this Token is "important cities", and the token_synonyms (specifically, the synonym_ngram field) would store "major cities" and "biggest cities", since those are the actual synonym ngrams that match the attribute phrases. For context phrases, we generally should have only one matched_squery_synonyms, since we try to find the best synonyms to use using the context phrase score. However, for attribute phrase we don't really have enough info to determine which synonym is better if they both trigger the same intent, and hence we will propagate both synonyms.

Attributes

  • source (type: String.t, default: nil) -
  • synonymNgram (type: String.t, default: nil) -

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() ::
  %GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersIntentQueryTokenSynonym{
    source: String.t() | nil,
    synonymNgram: String.t() | nil
  }

Functions

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

Unwrap a decoded JSON object into its complex fields.