训练 LUIS 应用的有效版本Train your active version of the LUIS app

训练是向语言理解 (LUIS) 应用进行教学以提高其自然语言理解能力的过程。Training is the process of teaching your Language Understanding (LUIS) app to improve its natural language understanding. 对模型进行更新(例如添加、编辑、标记或删除实体、意向或陈述)后,请对 LUIS 应用进行训练。Train your LUIS app after updates to the model such as adding, editing, labeling, or deleting entities, intents, or utterances.

对应用进行训练和测试是一个迭代过程。Training and testing an app is an iterative process. 训练 LUIS 应用后,采用示例陈述来对应用进行测试,查看是否能准确地识别意向和实体。After you train your LUIS app, you test it with sample utterances to see if the intents and entities are recognized correctly. 如果未能准确识别,请对 LUIS 应用进行更新和训练,然后再次测试。If they're not, make updates to the LUIS app, train, and test again.

训练将应用于 LUIS 门户中的活动版本。Training is applied to the active version in the LUIS portal.

如何以交互方式训练How to train interactively

若要在 LUIS 门户中启动迭代过程,首先需要将 LUIS 应用训练至少一次。To start the iterative process in the LUIS portal, you first need to train your LUIS app at least once. 在训练之前,请确保每个意向具有至少一个陈述。Make sure every intent has at least one utterance before training.

  1. 在“我的应用”页面上选择应用名称以访问应用。Access your app by selecting its name on the My Apps page.

  2. 在应用中,在顶部的面板中选择“训练”。 In your app, select Train in the top panel.

  3. 训练完成后,浏览器顶部会显示一条通知。When training is complete, a notification appears at the top of the browser.

训练日期和时间Training date and time

训练日期和时间是 GMT + 2。Training date and time are GMT + 2.

使用所有数据进行训练Train with all data

训练使用一小部分负采样。Training uses a small percentage of negative sampling. 如果要使用所有数据而不是一小部分负采样,请使用 APIIf you want to use all data instead of the small negative sampling, use the API.

使用 UseAllTrainingData 的版本设置 APIVersion settings API use of UseAllTrainingData

使用版本设置 API 并将 UseAllTrainingData 设置为 true 可关闭此功能。Use the Version settings API with the UseAllTrainingData set to true to turn off this feature.

不必要的训练Unnecessary training

不需要在每次更改后都进行训练。You do not need to train after every single change. 只有在向模型应用一组更改后并且要执行的下一步骤是测试或发布时,才应当进行训练。Training should be done after a group of changes are applied to the model, and the next step you want to do is to test or publish. 如果不需要测试或发布,则无需训练。If you do not need to test or publish, training isn't necessary.

使用 REST API 进行训练Training with the REST APIs

在 LUIS 门户中进行训练是单个步骤,只需按下“训练”按钮。Training in the LUIS portal is a single step of pressing the Train button. 使用 REST API 进行训练是一个两步过程。Training with the REST APIs is a two-step process. 第一个步骤是通过 HTTP POST 请求训练The first is to request training with HTTP POST. 然后通过 HTTP Get 请求训练状态Then request the training status with HTTP Get.

若要了解训练是何时完成的,必须对状态进行轮询,直至所有模型都成功训练。In order to know when training is complete, you have to poll the status until all models are successfully trained.

后续步骤Next steps