SynonymType
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
YAML 表示法 |
matchType: enum (MatchType )
acceptUnknownValues: boolean
entities:
string: object (Entity ) |
字段 |
matchType |
enum (MatchType )
可选。同义词的匹配类型。
|
acceptUnknownValues |
boolean
可选。如果设置为 true,系统将根据周围的输入和意图训练数据(例如可能添加到购物清单中的商品)匹配未知的字词或词组。
|
entities |
map (key: string, value: object (Entity ))
必需。同义词实体的命名映射。 包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" } 。
|
实体
表示同义词实体字段,其中包含该类型中单个条目的详细信息。
字段 |
display |
object (EntityDisplay )
可选。实体显示详细信息。
|
synonyms[] |
string
可选。实体的同义词列表。此字段可本地化。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\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.** |"]]