使用特征增强字词列表的信号Use features to boost signal of word list

可以将功能添加到 LUIS 应用以提高其准确性。You can add features to your LUIS app to improve its accuracy. 特征通过提供某些字词和短语是应用域词汇表的一部分的提示来帮助 LUIS。Features help LUIS by providing hints that certain words and phrases are part of an app domain vocabulary.

查看概念了解何时以及为何使用特征。Review concepts to understand when and why to use a feature.

添加短语列表作为特征Add phrase list as a feature

  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. 选择“生成”,然后在应用的左面板中选择“特征” 。Select Build, then select Features in your app's left panel.

  4. 在“特征”页上,选择“+ 创建” 。On the Features page, select + Create.

  5. 在“新建短语列表特征”对话框中,输入名称(例如 Cities)。In the Create new phrase list feature dialog box, enter a name such as Cities. 在“值”框中,输入示例城市(例如 Seattle)。In the Value box, enter examples of the cities, such as Seattle. 可以一次键入一个值或者用逗号分隔的一组值,然后按 Enter****。You can type one value at a time, or a set of values separated by commas, and then press Enter.

    屏幕截图显示添加特征(短语列表)城市的操作Screenshot of adding feature (phrase list) Cities

    为 LUIS 输入足够的值后,会显示建议。Once you have entered enough values for LUIS, suggestions appear. 对于建议的值,可以单击“+ 全部添加”,也可选择单个术语****。You can + Add all of the proposed values, or select individual terms.

  6. 如果短语可以交换使用,则让“这些值可以交换”保持选中状态。Keep These values are interchangeable checked if the phrases can be used interchangeably.

  7. 可以使用“全局”设置将短语列表应用于整个应用,或应用于特定模型(意向或实体)。The phrase list can apply to the entire app with the Global setting, or to a specific model (intent or entity). 如果创建短语列表,并作为意向或实体的特征,则切换后不会设置为全局。If you create the phrase list, as a feature from an intent or entity, the toggle is not set for global. 在这种情况下,切换的意义在于该特征仅对该模型是本地的,因此对应用程序而言不是全局的。In this case, the meaning of the toggle is that the feature is local only to that model, therefore, not global to the application.

  8. 选择“完成” 。Select Done. 新特征已添加到“ML 特征”页面。The new feature is added to the ML Features page.

备注

可以在“ML 特征”页上,删除或停用上下文工具栏中的短语列表。You can delete, or deactivate a phrase list from the contextual toolbar on the ML Features page.

全局短语列表会应用于整个应用Global phrase list applies to entire app

应将短语列表应用于预期要帮助的意向或实体,但有时需要将短语列表应用于整个应用,充当全局特征。A phrase list should be applied to the intent or entity it is intended to help but there may be times when a phrase list should be applied to the entire app as a Global feature.

在 ML 特征页面上,选择短语列表,然后在顶部的上下文工具栏中选择“全局应用”。On the ML Features page, select the phrase list, then select Make global in the top contextual toolbar.

作为特征的模型Model as a feature

实体可以是意向或实体的特征An entity can be a feature to an intent or entity.

若要将实体作为特征添加到意向,请从“意向”页面中选择意向,然后选择上下文工具栏上方的“+添加特征”。To add an entity as a feature to an intent, select the intent from the Intents page, then select + Add feature above the contextual toolbar. 该列表将包括所有可用作特征的短语列表和实体。The list will include all phrase lists and entities that can be applied as features.

若要将实体作为特征添加到另一个实体,可以使用 Entity Palette 在“意向”详细信息页面上添加特征,也可以在“实体”详细信息页面上添加特征To add an entity as a feature to another entity, you can add the feature either on the Intent detail page using the Entity Palette or you can add the feature on the Entity detail page.

后续步骤Next steps

添加、编辑、删除或停用特征后,再次定型和测试应用,查看性能是否有所改善。After adding, editing, deleting, or deactivating a feature, train and test the app again to see if performance improves.