在示例言语中标记机器学习实体Label machine-learning entity in an example utterance

在示例言语中标记实体可为 LUIS 提供示例,其中包含实体的示例,以及实体可以在言语中出现的位置的示例。Labeling an entity in an example utterance gives LUIS an example of what the entity is and where the entity can appear in the utterance.

你可以标记机器学习的实体和子实体。You can label machine-learned entities and subentities.

由于无法标记正则表达式、列表或预生成的实体,请创建一个实体或子实体,然后在适用时将这些实体作为特征添加到实体或子实体。Because you can't label regular expression, list, or prebuilt entities, create an entity or subentity, then add these entities as features, when applicable, to the entity or subentity.

从意向详细信息页中标记示例言语Label example utterances from the Intent detail page

若要标记言语中实体的示例,请选择言语的意向。To label examples of entities within the utterance, select the utterance's intent.

  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 the Intent that has the example utterances you want to label for extraction with an entity.
  4. 选择要标记的文本,然后选择实体。Select the text you want to label then select the entity.

标记实体的两种方法Two techniques to label entities

意向详细信息页上支持两种标记方法。Two labeling techniques are supported on the Intent detail page.

  • 实体调色板中选择实体或子实体,然后在示例言语文本中进行选择。Select entity or subentity from Entity Palette then select within example utterance text. 这是建议使用的方法,因为你可以根据自己的架构,直观地验证你使用的是否为正确的实体或子实体。This is the recommended technique because you can visually verify you are working with the correct entity or subentity, according to your schema.
  • 首先在示例言语文本中进行选择。Select within the example utterance text first. 执行此操作时,会显示标记选项的弹出菜单。When you do this, a pop-up menu of labeling choices is presented.

显示了“实体调色板”的标签Label with the Entity Palette visible

规划包含实体的架构后,在标记时请让“实体调色板”保持可见状态。After you've planned your schema with entities, keep the Entity palette visible while labeling. 实体调色板 会提醒你计划提取哪些实体。The Entity palette is a reminder of what entities you planned to extract.

若要访问 实体调色板 ,请在示例言语列表上方的上下文工具栏中选择 @ 符号。To access the Entity Palette , select the @ symbol in the contextual toolbar above the example utterance list.

意向详细信息页上的实体调色板的屏幕截图。Screenshot of entity palette on Intent details page.

如何从实体调色板中标记实体How to label entity from Entity Palette

实体调色板提供之前的标记体验的替代方法。The entity palette offers an alternative to the previous labeling experience. 它允许对文本进行画笔处理,使其能够立即使用实体进行标记。It allows you to brush over text to instantly label it with an entity.

  1. 通过选择言语表右上方的 @ 符号来打开实体调色板。Open the entity palette by selecting on the @ symbol at the top right of the utterance table.

  2. 从调色板中选择要标记的实体。Select the entity from the palette that you want to label. 此操作采用可视方式指示新的光标。This action is visually indicated with a new cursor. 当你在 LUIS 门户中移动时,光标会跟随鼠标。The cursor follows the mouse as you move in the LUIS portal.

  3. 在示例言语中,用光标绘制 实体。In the example utterance, paint the entity with the cursor.

    屏幕截图显示了用光标绘制的实体。Screenshot shows the entity painted with the cursor.

从实体调色板中将实体添加为特征Adding entity as a feature from the Entity Palette

实体调色板的下半部分允许你向当前选定的实体添加特征。The Entity Palette's lower section allows you to add features to the currently selected entity. 你可以从所有现有实体和短语列表中进行选择,也可以创建新的短语列表。You can select from all existing entities and phrase lists or create a new phrase list.

实体调色板的屏幕截图,其中包含作为特征的实体Screenshot of Entity palette with entity as a feature

标记实体角色Labeling entity roles

实体角色使用 实体调色板 进行标记。Entity roles are labeled using the Entity palette.

  1. 在“意向详细信息”页上,从上下文工具栏中选择“实体调色板”。In the Intent detail page, select the Entity palette from the context toolbar.
  2. 在实体调色板打开后,从实体列表中选择实体。After the Entity palette opens, select the entity from the list of entity.
  3. 在实体列表下方,选择一个现有角色。Below the list of entities, select an existing role.
  4. 在示例言语文本中,使用实体角色标记文本。In the example utterance text, label the text with the entity role.

如何从就地菜单中标记实体How to label entity from in-place menu

就地标记允许你快速选择言语中的文本并对其进行标记。Labeling in-place allows you to quickly select the text within the utterance and label it. 你还可以从已标记的文本创建机器学习实体或列表实体。You can also create a machine learning entity or list entity from the labeled text.

请考虑示例言语 hi, please I want a cheese pizza in 20 minutesConsider the example utterance, hi, please I want a cheese pizza in 20 minutes.

选择最左侧的文本,接着选择实体最右侧的文本,然后从就地菜单中选择想要用其进行标记的实体。Select the left-most text, then select the right-most text of the entity, then from the in-place menu, pick the entity you want to label with.

标记完整的机器学习实体Label complete machine-learning entity

查看标记的文本Review labeled text

进行标记后,查看示例言语,并确保选定的一段文本中的选定实体带有下划线。After labeling, review the example utterance and ensure the selected span of text has been underlined with the chosen entity. 实线指示文本已被标记。The solid line indicates the text has been labeled.

已标记的完整机器学习实体Labeled complete machine-learning entity

确认预测的实体Confirm predicted entity

如果这一段文本被虚线框框起来,则表示此文本已进行预测,但尚未标记。If there is a dotted-lined box around the span of text, it indicates the text is predicted but not labeled yet. 若要将预测转变为标签,请选择该言语所在的行,然后从上下文工具栏中选择“确认实体”。To turn the prediction into a label, select the utterance row, then select Confirm entities from the contextual toolbar.

在现有实体上重新标记Relabeling over existing entities

如果你重新标记已标记的文本,则 LUIS 可以拆分或合并现有标签。If you relabel text that is already labeled, LUIS may split or merge existing labels.

标点符号的标记Labeling for punctuation

你不需要为标点符号进行标记。You do not need to label for punctuation. 请使用应用程序设置来控制标点符号对言语预测的具体影响。Use application settings to control how punctuation impacts utterance predictions.

取消标记实体Unlabel entities

备注

仅可将机器已学习的实体取消标记。Only machine learned entities can be unlabeled. 不能对正则表达式实体、列表实体或预生成的实体进行标记或取消标记操作。You can't label or unlabel regular expression entities, list entities, or prebuilt entities.

若要取消标记某个实体,请选择该实体,然后从就地菜单中选择“取消标记”。To unlabel an entity, select the entity and select Unlabel from the in-place menu.

屏幕截图,显示了如何将实体取消标记Screenshot showing unlabeling entity

父实体和子实体的自动标记Automatic labeling for parent and child entities

如果你标记父实体,则会标记可根据当前训练的版本对其进行预测的任何子实体。If you are labeling a parent entity, any subentity that can be predicted based on the currently trained version, will be labeled.

如果你为某个子实体进行标记,则会自动标记父实体。If you are labeling for a subentity, the parent will be labeled automatically.

非机器学习的实体的自动标记Automatic labeling for non-machine learned entities

非机器学习的实体包括预生成实体、正则表达式实体、列表实体和 pattern.any 实体。Non-machine learned entities include prebuilt entities, regular expression entities, list entities, and pattern.any entities. 这些实体由 LUIS 自动标记,因此无需用户手动标记它们。These are automatically labeled by LUIS so they are not required to be manually labeled by users.

意向预测错误Intent prediction errors

意向预测错误表明,系统不会在给出当前训练的应用的情况下针对意向来预测示例言语。An intent prediction error indicates that the example utterance, given the current trained app, would not be predicted for the intent.

了解如何在意向详细信息页上查看这些错误Learn how to view these errors on the Intent detail page.

实体预测错误Entity prediction errors

实体预测错误表示预测的实体与标记的实体不匹配。Entity prediction errors indicate the predicted entity doesn't match the labeled entity. 这通过言语旁边的警告指示器直观显示。This is visualized with a caution indicator next to the utterance.

机器学习实体的实体调色板Entity palette for machine-learning entity

后续步骤Next steps

使用仪表板查看终结点言语来提高应用的预测质量。Use the dashboard and review endpoint utterances to improve the prediction quality of your app.