Pattern.any 實體

重要

LUIS 將於 2025 年 10 月 1 日淘汰,而自 2023 年 4 月 1 日開始,您將無法建立新的 LUIS 資源。 建議移轉 LUIS 應用程式交談語言理解,以享有產品持續支援和多語言功能的優點。

Pattern.any 是僅用於模式範本表達的可變長度預留位置,用來標記實體開始及結束的位置。

Pattern.any 實體必須在 Pattern 範例中標示,而不是意圖使用者範例。

當下列狀況時,實體很適合:

  • 實體的結尾可能會與語句的其餘文字混淆。

使用方式

假設用戶端應用程式會根據標題搜尋書籍,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 實體從語句格式正確且數據結尾可能很容易與語句的其餘單字混淆的語句中擷取數據。