将活动的已训练应用发布到过渡或生产终结点Publish your active, trained app to a staging or production endpoint

当完成生成、训练和测试活动 LUIS 应用的操作时,可将其发布到终结点,使其可供客户端应用程序使用。When you finish building, training, and testing your active LUIS app, make it available to your client application by publishing it to the endpoint.

发布Publishing

  1. 登录到 LUIS 门户,选择“订阅”和“创作资源”以查看分配给该创作资源的应用。Sign in to the LUIS portal, and select your Subscription and Authoring resource to see the apps assigned to that authoring resource.

  2. 在“我的应用”页上选择应用名称以打开应用。Open your app by selecting its name on My Apps page.

  3. 若要发布到终结点,请在右上方的面板中选择“发布”。To publish to the endpoint, select Publish in the top, right panel.

    导航栏右上角的“发布”按钮

  4. 选择用于已发布的预测终结点的设置,然后选择“发布”。Select your settings for the published prediction endpoint, then select Publish.

    选择发布设置,然后选择“发布”按钮

发布槽Publishing slots

当显示弹出窗口时选择正确的槽:Select the correct slot when the pop-up window displays:

  • 过渡Staging
  • 生产Production

使用两个发布槽,可以对已发布的终结点使用两个不同版本的应用,或者在两个不同的终结点上使用同一版本。By using both publishing slots, this allows you to have two different versions of your app available at the published endpoints or the same version on two different endpoints.

发布区域Publishing regions

该应用将发布到与 LUIS 预测终结点资源关联的所有区域,这些资源在 LUIS 门户中通过“管理” -> “Azure 资源”页添加。The app is published to all regions associated with the LUIS prediction endpoint resources added in the LUIS portal from the Manage -> Azure Resources page.

例如,对于在 https://luis.azure.cn 上创建的应用,如果你在 chinaeast2 中创建 LUIS 资源并将其作为资源添加到此应用,则此应用将发布到该区域中。For example, for an app created on https://luis.azure.cn, if you create a LUIS resource in chinaeast2, and add these to the app as resource, the app is published in this region. 有关 LUIS 区域的详细信息,请参阅区域For more information about LUIS regions, see Regions.

提示

你必须在要向其发布内容的区域中创作。You must author in the region you intend to publish to. 如果需要将内容发布到所有区域,需要在所有 3 个创作区域中管理创作过程和生成的已定型模型。If you need to publish to all regions, you need to manage your authoring process and the resulting trained model in all 3 authoring regions.

配置发布设置Configuring publish settings

在选择槽后,为以下项配置发布设置:After you select the slot, configure the publish settings for:

  • 情绪分析Sentiment analysis
  • 拼写更正 - 仅限 v2 预测终结点Spelling correction - v2 prediction endpoint only

发布以后,即可在“发布设置”页的“管理”部分查看这些设置。 After you publish, these settings are available for review from the Manage section's Publish settings page. 可以在每次发布时更改设置。You can change the settings with every publish. 如果取消发布,则在发布过程中所做的任何更改也会被取消。If you cancel a publish, any changes you made during the publish are also canceled.

当应用发布后When your app is published

成功发布应用后,浏览器顶部会显示一个表示成功的通知。When your app is successfully published, a success notification appears at the top of the browser. 通知还包含指向终结点的链接。The notification also includes a link to the endpoints.

如果需要终结点 URL,请选择该链接。If you need the endpoint URL, select the link. 还可以通过在顶部菜单中选择“管理”,然后在左侧菜单中选择“Azure 资源”来访问终结点 URL。You can also get to the endpoint URLs by selecting Manage in the top menu, then select Azure Resources in the left menu.

情绪分析Sentiment analysis

情绪分析使 LUIS 可以与文本分析集成,以便提供情绪和关键短语分析。Sentiment analysis allows LUIS to integrate with Text Analytics to provide sentiment and key phrase analysis.

不需提供文本分析密钥,而且系统不会因为此服务向你的 Azure 帐户收费。You do not have to provide a Text Analytics key and there is no billing charge for this service to your Azure account.

情绪数据是一个介于 0 到 1 之间的分数,指示数据的正面情绪(分数接近 1)或负面情绪(分数接近 0)。Sentiment data is a score between 1 and 0 indicating the positive (closer to 1) or negative (closer to 0) sentiment of the data. positiveneutralnegative 的情绪标签针对每个支持的区域性。The sentiment label of positive, neutral, and negative is per supported culture. 目前,仅英语支持情绪标签。Currently, only English supports sentiment labels.

若要详细了解使用情绪分析时的 JSON 终结点响应,请参阅情绪分析For more information about the JSON endpoint response with sentiment analysis, see Sentiment analysis

拼写更正Spelling correction

注意

V3 API 预测终结点不支持此功能。This feature is not supported in the V3 API for prediction endpoints.

在 LUIS 用户话语预测之前纠正拼写错误。Corrections to spelling are made before the LUIS user utterance prediction. 可以在响应中查看对原始话语所做的任何更改,包括拼写方面的更改。You can see any changes to the original utterance, including spelling, in the response.

后续步骤Next steps

  • 请参阅管理密钥以了解如何将密钥添加到针对 LUIS 的 Azure 订阅密钥、如何设置必应拼写检查密钥以及如何将所有意向包含在结果中。See Manage keys to add keys to Azure subscription key to LUIS and how to set the Bing Spell Check key and include all intents in results.
  • 有关如何在测试控制台中测试已发布应用的说明,请参阅训练和测试应用See Train and test your app for instructions on how to test your published app in the test console.