SynonymType
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Nhập đối sánh văn bản theo một nhóm các từ đồng nghĩa.
Trình bày theo YAML |
matchType: enum (MatchType )
acceptUnknownValues: boolean
entities:
string: object (Entity ) |
Trường |
matchType |
enum (MatchType )
Không bắt buộc. Loại đối sánh cho từ đồng nghĩa.
|
acceptUnknownValues |
boolean
Không bắt buộc. Khi bạn đặt chính sách này thành true, chính sách này sẽ so khớp những từ hoặc cụm từ không xác định dựa trên dữ liệu huấn luyện theo ý định và thông tin đầu vào xung quanh, chẳng hạn như các mặt hàng có thể được thêm vào danh sách mua sắm.
|
entities |
map (key: string, value: object (Entity ))
Bắt buộc. Bản đồ được đặt tên của các thực thể từ đồng nghĩa. Một đối tượng chứa danh sách các cặp "key": value . Ví dụ: { "name": "wrench", "mass": "1.3kg", "count": "3" } .
|
Thực thể
Đại diện cho một trường thực thể từ đồng nghĩa có chứa thông tin chi tiết về một mục bên trong kiểu đó.
Trình bày theo YAML |
display:
object (EntityDisplay )
synonyms:
- string |
Trường |
display |
object (EntityDisplay )
Không bắt buộc. Thông tin chi tiết về hiển thị thực thể.
|
synonyms[] |
string
Không bắt buộc. Danh sách các từ đồng nghĩa với đối tượng. Trường này có thể bản địa hoá.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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.** |"]]