SynonymType
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Typ pasujący do tekstu według zestawu synonimów.
Reprezentacja YAML |
matchType: enum (MatchType )
acceptUnknownValues: boolean
entities:
string: object (Entity ) |
Pola |
matchType |
enum (MatchType )
Opcjonalnie: Typ dopasowania synonimu.
|
acceptUnknownValues |
boolean
Opcjonalnie: Gdy zasada ma wartość Prawda, dopasowuje nieznane słowa lub wyrażenia na podstawie otaczających je danych wejściowych i trenowania intencji, np. produktów, które można dodać do listy zakupów.
|
entities |
map (key: string, value: object (Entity ))
Wymagane. Mapa nazwana elementów synonimów. Obiekt zawierający listę par "key": value . Przykład: { "name": "wrench", "mass": "1.3kg", "count": "3" } .
|
Jednostka
Reprezentuje pole elementu synonimu, które zawiera szczegóły pojedynczego wpisu wewnątrz typu.
Reprezentacja YAML |
display:
object (EntityDisplay )
synonyms:
- string |
Pola |
display |
object (EntityDisplay )
Opcjonalnie: Wyświetlą się szczegóły elementu.
|
synonyms[] |
string
Opcjonalnie: Lista synonimów elementu. To pole można zlokalizować.
|
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eThis content describes a type that matches text using synonyms, with options for match type and unknown value handling.\u003c/p\u003e\n"],["\u003cp\u003eIt includes entities, which are named maps of synonym entities with details like display and synonyms list.\u003c/p\u003e\n"],["\u003cp\u003eThe synonym type uses a YAML representation for defining its structure and properties.\u003c/p\u003e\n"],["\u003cp\u003eEntities within the synonym type can also have their own YAML representation and properties, including display and synonyms.\u003c/p\u003e\n"]]],[],null,["# SynonymType\n\n- [YAML representation](#SCHEMA_REPRESENTATION)\n- [Entity](#Entity)\n - [YAML representation](#Entity.SCHEMA_REPRESENTATION)\n\nType that matches text by set of synonyms.\n\n| YAML representation ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| matchType: enum (/assistant/actionssdk/reference/rest/Shared.Types/MatchType) acceptUnknownValues: boolean entities: string: object (/assistant/actionssdk/reference/rest/Shared.Types/SynonymType#Entity) |\n\n| Fields ||\n|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `matchType` | `enum (`[MatchType](/assistant/actionssdk/reference/rest/Shared.Types/MatchType)`)` Optional. The match type for the synonym. |\n| `acceptUnknownValues` | `boolean` Optional. When set to true this will match unknown words or phrases based on surrounding input and intent training data, such as items that might be added to a grocery list. |\n| `entities` | `map (key: string, value: object (`[Entity](/assistant/actionssdk/reference/rest/Shared.Types/SynonymType#Entity)`))` Required. Named map of synonym entities. An object containing a list of `\"key\": value` pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }`. |\n\nEntity\n------\n\nRepresents a synonym entity field that contains the details of a single entry inside the type.\n\n| YAML representation ||\n|--------------------------------------------------------------------------------------------------------------|---|\n| ``` display: object (/assistant/actionssdk/reference/rest/Shared.Types/EntityDisplay) synonyms: - string ``` |\n\n| Fields ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `display` | `object (`[EntityDisplay](/assistant/actionssdk/reference/rest/Shared.Types/EntityDisplay)`)` Optional. The entity display details. |\n| `synonyms[]` | `string` Optional. The list of synonyms for the entity. **This field is localizable.** |"]]