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

The goal of the special words are to: - Canonicalize the user query by rewriting abbreviations into the canonical version that is indexed. - Figure out at index time for each element which tokens are important. We use this to decide if an address component is matched or not. For instance in "1600 Pennsylvania Ave NW" since "NW" is recognised as a directional (and "Ave" is recognised as a street visible type), "Pennsylvania" becomes the name and you can't match this street by just specifying "avenue" or "NW".

Attributes

  • alternate (type: list(String.t), default: nil) - Alternate versions of this canonical form. This is mainly abbreviations of the canonical form e.g. "St", "NE", etc. This should be present as it is used in the specified language with the correct capitalization, accents, etc. in UTF-8.
  • canonical (type: list(String.t), default: nil) - Canonical versions: the version which is in oyster. This should be present as it is used in the specified language with the correct capitalization, accents, etc. in UTF-8. The canonical can be a single or a multi-token string. There can be several canonicals, e.g. "center" and "centre" in English.
  • country (type: list(String.t), default: nil) - If empty, apply this rule to any country. Otherwise, a list of ISO 3166-1 alpha-2 (2-letter uppercase) country codes that this description applies to.
  • flags (type: GoogleApi.ContentWarehouse.V1.Model.MapsQualitySpecialWordsFlags.t, default: nil) - Boolean flags indicating what type of special word this is.
  • language (type: list(String.t), default: nil) - The III language code of the language that this description applies to. No language means that this applies worldwide. This could be useful for codes like country codes or airport codes or for displayed language neutral icons. A special word with a language code here also applies to the regional variants of that language (e.g. "en" applies to "en-GB" and "en-US" as well).
  • position (type: String.t, default: nil) -
  • visibleTypeId (type: list(String.t), default: nil) - visible_type_id from VisibleTypeProto for visible types converted to the special words. For original special words this field is empty.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() :: %GoogleApi.ContentWarehouse.V1.Model.MapsQualitySpecialWordsProto{
  alternate: [String.t()] | nil,
  canonical: [String.t()] | nil,
  country: [String.t()] | nil,
  flags:
    GoogleApi.ContentWarehouse.V1.Model.MapsQualitySpecialWordsFlags.t() | nil,
  language: [String.t()] | nil,
  position: String.t() | nil,
  visibleTypeId: [String.t()] | nil
}

Functions

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

Unwrap a decoded JSON object into its complex fields.