Pattern.any 实体

重要

LUIS 将于 2025 年 10 月 1 日停用,从 2023 年 4 月 1 日开始,你将无法创建新的 LUIS 资源。 建议将 LUIS 应用程序迁移对话语言理解,以便从持续的产品支持和多语言功能中受益。

Patterns.any 是一种长度可变的占位符,仅在模式的模板话语中使用,用于标记实体的起始和结束位置。

需要在模式模板示例而不是意向用户示例中标记 Pattern.any 实体。

在以下情况下,非常适合使用此实体:

  • 实体的末尾可能与话语的其余文本相混淆。

使用情况

假设某个客户端应用程序需要基于标题搜索书籍,则 pattern.any 会提取完整的标题。 一个使用 pattern.any 进行这种书籍搜索的模板话语是 Was {BookTitle} written by an American this year[?]

在下表中,每行包含话语的两个版本。 最上面的话语是 LUIS 最初看到的话语。 不清楚书名在哪里开始和在哪里结束。 最下面的话语使用 Pattern.any 实体来标记实体的开头和结尾。

以粗体显示带实体的话语
Was The Man Who Mistook His Wife for a Hat and Other Clinical Tales written by an American this year?

《错把太太当成帽子的男人与其他医疗故事》是某位美国人在今年撰写的吗?
Was Half Asleep in Frog Pajamas written by an American this year?

《在宽大睡衣中半梦半睡》是某位美国人在今年撰写的吗?
Was The Particular Sadness of Lemon Cake: A Novel written by an American this year?

《小说:柠檬蛋糕的特种忧伤》 是某位美国人在今年撰写的吗?
Was There's A Wocket In My Pocket! written by an American this year?

《口袋里的毛怪!》是今年美国人写的吗?

示例 JSON

请考虑下列查询:

where is the form Understand your responsibilities as a member of the community and who needs to sign it after I read it?

将嵌入式窗体名称提取为 Pattern.any:

Understand your responsibilities as a member of the community

"entities": [
  {
    "entity": "understand your responsibilities as a member of the community",
    "type": "FormName",
    "startIndex": 18,
    "endIndex": 78,
    "role": ""
  }

后续步骤

在本教程中,对于格式良好且数据结尾可能容易与话语的剩余单词混淆的话语,我们使用 Pattern.any 实体从这些话语中提取数据。