MapsQualitySpecialWordsProto

GoogleApi.ContentWarehouse.V1.Model.MapsQualitySpecialWordsProto


Table of Contents ▼

Jump to a specific part of the page:

Description

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 List

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

View Attributes

Attributes

  1. 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.
  2. 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.
  3. 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.
  4. flags (type: GoogleApi.ContentWarehouse.V1.Model.MapsQualitySpecialWordsFlags, default: nil)
    - Boolean flags indicating what type of special word this is.
  5. 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).
  6. position (type: String.t, default: nil)
    -
  7. 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.

Type

@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
}

Function

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

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