预生成域、意向和实体模型Prebuilt domain, intent, and entity models

预生成模型提供了域、意向、话语和实体。Prebuilt models provide domains, intents, utterances, and entities. 可以使用预生成域启动你的应用,也可以在以后向你的应用添加相关域。You can start your app with a prebuilt domain or add a relevant domain to your app later.

预构建的模型的类型Types of prebuilt models

LUIS 提供了 3 种预构建的模型。There are 3 types of prebuilt models LUIS provides. 可以随时向你的应用中添加每个模型。Each model can be added to your app at any time.

模型类型Model type 包括Includes
Domain 意向、话语、实体Intents, utterances, entities
意向Intents 意向、话语Intents, utterances
实体Entities 仅实体Entities only

预生成域Prebuilt domains

语言理解 (LUIS) 提供“预生成域”,预生成域是意向实体的预生成集,意向和实体可共同用于客户端应用程序的域或常见类别进行。Language Understanding (LUIS) provides prebuilt domains, which are prebuilt sets of intents and entities that work together for domains or common categories of client applications.

预生成域已经过训练,就绪可添加到你的 LUIS 应用中。The prebuilt domains are trained and ready to add to your LUIS app. 将预生成域中的意向和实体添加到应用后,它们是完全可自定义的。The intents and entities in a prebuilt domain are fully customizable once you've added them to your app.

如果首先自定义整个预生成域,请删除应用不需要的意向和实体。If you start from customizing an entire prebuilt domain, delete the intents and entities that your app doesn't need to use. 还可向预生成域已提供的集中添加一些意向或实体。You can also add some intents or entities to the set that the prebuilt domain already provides. 例如,如果对体育赛事应用使用“事件”预生成域,可对运动队添加实体。For example, if you are using the Events prebuilt domain for a sports event app, you can to add entities for sports teams. 开始向 LUIS 提供表述时,请包含特定于应用的术语。When you start providing utterances to LUIS, include terms that are specific to your app. LUIS 将学习识别它们,并根据应用需求对预生成域的意向和实体进行自定义。LUIS learns to recognize them and tailors the prebuilt domain's intents and entities to your app's needs.

Tip

组合使用预生成域中的意向和实体时效果最佳。The intents and entities in a prebuilt domain work best together. 应尽量结合使用同一个域中的意向和实体。It's better to combine intents and entities from the same domain when possible. “实用工具”预生成域包含可以进行自定义以用于任何域的意向。The Utilities prebuilt domain has intents that you can customize for use in any domain. 例如,可向应用添加 Utilities.Repeat,然后对其进行培训,使其识别用户可能想在你的应用程序中重复的任何操作。For example, you can add Utilities.Repeat to your app and train it recognize whatever actions user might want to repeat in your application.

更改预生成域意向的行为Changing the behavior of a prebuilt domain intent

你可能会发现,虽然预生成域中某个意向与你要在 LUIS 应用中使用的意向类似,但你希望它具有不同的行为。You might find that a prebuilt domain contains an intent that is similar to an intent you want to have in your LUIS app but you want it to behave differently. 例如,“地点”预生成域提供用于预订餐厅的 MakeReservation 意向,但你希望应用使用该意向预订酒店。For example, the Places prebuilt domain provides an MakeReservation intent for making a restaurant reservation, but you want your app to use that intent to make hotel reservations. 在这种情况下,可以通过以下方法修改该意向的行为:向 LUIS 提供有关预订酒店的表述,并使用 MakeReservation 意向为其添加标记。这使得 LUIS 可接受重新培训,以识别预订酒店请求中的 MakeReservation 意向。In that case, you can modify the behavior of that intent by providing utterances to LUIS about making hotel reservations and labeling them using the MakeReservation intent, so then LUIS can be retrained to recognize the MakeReservation intent in a request to book a hotel.

可在预生成域参考中找到预生成域的完整列表。You can find a full listing of the prebuilt domains in the Prebuilt domains reference.

预生成意向Prebuilt intents

LUIS 提供了预生成意向及其话语。LUIS provides prebuilt intents and their utterances. 可以仅添加意向,而不添加整个域。Intents can be added without adding the whole domain. 添加意向是添加意向及其话语的过程。Adding an intent is the process of adding an intent and its utterances. 意向名称和话语列表都可以修改。Both the intent name and the utterance list can be modified.

预生成的实体Prebuilt entities

LUIS 包括一组预生成实体,用于识别常见类型的信息,如日期、时间、数字、度量和货币。LUIS includes a set of prebuilt entities for recognizing common types of information, like dates, times, numbers, measurements, and currency. 预构建实体支持因 LUIS 应用的区域性而异。Prebuilt entity support varies by the culture of your LUIS app. 有关 LUIS 支持的预构建实体的完整列表,包括区域性支持,请参阅预构建实体参考For a full list of the prebuilt entities that LUIS supports, including support by culture, see the prebuilt entity reference.

当预构建实体包含在应用程序中时,其预测将包含在发布的应用程序中。When a prebuilt entity is included in your application, its predictions are included in your published application. 预构建实体的行为是预先训练的,不能修改的。The behavior of prebuilt entities is pre-trained and cannot be modified. 请按照以下步骤了解预构建实体的工作原理:Follow these steps to see how a prebuilt entity works:

Note

builtin.datetime 已弃用。builtin.datetime is deprecated. 它由 builtin.datetimeV2 取代,后者提供日期和时间范围的识别,并改进了对模糊日期和时间的识别。It is replaced by builtin.datetimeV2, which provides recognition of date and time ranges, as well as improved recognition of ambiguous dates and times.

后续步骤Next steps

了解如何向你的应用添加预生成的实体Learn how to add prebuilt entities to your app.