Pattern.any entity

重要

语言理解智能服务(LUIS)将于 2026 年 3 月 31 日完全停用。 LUIS 资源创建不可用。 从 2025 年 10 月 31 日开始,LUIS 门户将不再可用。 建议将 LUIS 应用程序迁移对话语言理解,以便从持续的产品支持和多语言功能中受益。

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

Pattern.any entities need to be marked in the Pattern template examples, not the intent user examples.

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

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

Usage

假设某个客户端应用程序需要基于标题搜索书籍,则 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?

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

Example 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": ""
  }

Next steps

In this tutorial, use the Pattern.any entity to extract data from utterances where the utterances are well-formatted and where the end of the data may be easily confused with the remaining words of the utterance.