.lu 檔案格式

適用于: SDK v4

.lu 檔案描述語言理解模型。 .lu 檔案包含適用于語言理解概念的類似 Markdown 的簡單文字型定義。 您可以使用一或多個 .lu 檔案,為 Bot 所使用的自然語言理解(NLU) 服務或引擎定型語言模型,例如 Language Understanding (LUIS) Orchestrator 。 您選擇的 NLU 引擎只能解譯 .lu 檔案可以描述的元素子集。

NLU 引擎依賴語言模型來瞭解使用者所說的內容。 引擎會從一組定型範例建立語言模型,就像任何機器學習演算法一樣。 定型之後,引擎會使用模型來預測語句的 意圖,一般是以一或多個 意圖的形式來表示使用者想要執行的工作或動作,以及代表與意圖相關的元素的零個或多個實體。

您可以使用 LUIS 或 Orchestrator 搭配使用 Bot Framework SDK 或 Composer 所開發的任何 Bot。

注意

Language Understanding (LUIS) 將于 2025 年 10 月 1 日淘汰。 從 2023 年 4 月 1 日起,您將無法建立新的 LUIS 資源。 新版的語言理解現在已提供作為 Azure AI 語言的一部分。

對話式語言理解(CLU)是 Azure AI 語言的一項功能,是 LUIS 的更新版本。 如需 Bot Framework SDK 中語言理解支援的詳細資訊,請參閱 自然語言理解

本文是一個參考,說明如何以 .lu 檔案格式表示語言模型專案。 如需 Bot 中如何使用語言理解的資訊,請參閱 Composer 中的 Language Understanding 或 自然語言處理。

使用範例語句定義意圖

意圖代表使用者想要執行的工作或動作,如使用者語句中所表示。 您將意圖新增至 Bot,使其能夠識別代表相同使用者意圖的問題或命令群組。

您可能為旅遊 Bot 定義的一些意圖範例,以及其定義來源的範例語句:

Intent 表達範例
BookFlight 「預訂我下周飛往茂伊的航班」
「17日飛我到茂伊」
「我需要下週五去茂伊的飛機票」
問候 「Hi」
「Hello」
「午後好」
CheckWeather 「下周毛伊的天氣是什麼?
「我喜歡餅乾」
「鬥牛犬已經記錄跳超過7英尺」

除了您定義的意圖之外,None 是後援意圖, 會在無法從使用者語句判斷意圖時引發 unknownIntent 事件。 使用 LUIS 時, None 意圖是您需要使用網域外部語句建立的必要意圖。 與您的 None 意圖相關聯的語句應該大約占 .lu 檔案中語句總數的 10%。

其範例語句的意圖會以下列方式宣告:

# <intent-name>
    - <utterance1>
    - <utterance2>

# <intent-name> 描述新的意圖定義區段。 意圖定義後面的每一行都是使用 格式描述該意圖的 - <utterance> 範例語句。

以下是示範這些意圖的範例 .lu 檔案,以及擷取使用者表達意圖方式的範例語句:

> Use ">" to create a comment in your .lu files.
> Use multiple comment ">" characters to define outlining
> sections in the file to help you organize the content.

>> Primary intents
# BookFlight
- Book me a flight to Maui next week
- Fly me to Maui on the 17th
- I need a plane ticket next Friday to Maui

# Greeting
- Hi
- Hello
- Good afternoon

>> Secondary intents
# CheckWeather
- What's the weather like in Maui next week?

注意

-使用 、 +* 字元來表示清單。 不支援編號清單。

使用 > 來建立批註。

多個批註 (「」 > ) 字元也可以用來定義 .lu 檔案中的大綱區段,以協助您組織內容。 Composer 可讓您在編輯 LU 檔案時利用大綱。

如需意圖和語句的詳細資訊,請參閱 LUIS 應用程式中 的意圖,並在 LUIS 檔中瞭解 LUIS 應用程式 有哪些良好的語句。

實體

實體是語句的一部分,可視為可用於解譯意圖的參數。 例如,在語句 中將票證預訂至 Maui,Maui 是 FlightDestination 實體。

範例使用者語句 預測的意圖 已找出實體 說明
喂,你好嗎? 問候 - 沒有要擷取的實體。
「預訂飛往茂伊的航班」 BookFlight 「Maui」 「FlightDestination」 實體會擷取為 「Maui」。
「下周毛伊的天氣是什麼? CheckWeather 「Maui」、「下周」 「WeatherLocation」 實體會擷取為 「Maui」 和 「DateRange」 實體,並擷取為 「下周」。
「我想訂購一個小披薩」 orderPizza 「small」 「大小」實體會擷取為「small」。
「在下午 1 點與 Bob 在散發中排程會議」 ScheduleMeeting 「1pm」、「Bob」 「MeetingTime」 實體會擷取為 「1pm」 ,而 「Attendees」 實體會擷取為 「Bob」。

提示

如需在 LUIS 中使用實體的特定詳細資訊,請參閱 LUIS 檔中的 LUIS 中的實體。

實體定義

實體定義會定義如何將語句中的範圍辨識為可在 Bot 中使用的實體。 有許多不同類型的實體,包括:機器學習、預先建置、清單、正則運算式和模式。

.lu 檔案中的實體定義會以 at sign ( @ ) 開頭專案,後面接著實體和機構名稱的類型:

@ <entity-type> <entity-name>

或者,每個實體也可以有 角色 來識別相同實體的不同用途。 您也可以新增 功能 ,協助更妥善地辨識實體。 一般語法如下所示:

@ <entity-type> <entity-name> [[hasRole[s]] <comma-separated-list-of-roles>] [hasFeature[s] <comma-separated-list-of-features>]

需要定義之實體,例如 清單 正則運算式 實體,會使用下列標記法來表示:

@ <entity-type> <entity1-name> = <definition>

下列各節將示範實體宣告的其他範例,以及其套用的實體類型。

除了預先建置的實體 之外 ,機構名稱可以包含具有空格的多個單字。 所有具有空格的機構名稱都必須以引號括住:

@ ml "this is a simple entity" role1, role2 = definition
@ ml 'another simple entity' hasRole role1 hasFeatures feature1, feature2

實體類型

LUIS 中有數種類型的實體。 在下列各節中,您將瞭解這些實體類型和相關概念,例如 角色 功能 ,以及如何建立使用這些實體的 LU 範本範例。

機器學習實體

機器學習實體 是可讓您在範例語句中為其加上標籤的範例的實體。 這可讓他們瞭解所需的內容。 當識別格式不一定正確但具有相同意義的資料時,機器學習實體很理想。

下列範例示範名為 city ( @ ml city ) 的機器學習實體,以及 bookFlight 具有標籤實體之範例語句的意圖:

> Define the city machine-learned entity
@ ml city

> Define the bookFlight intent with sample utterances that contain the machine-learned entities
# bookFlight
- Book a flight from {@city = Cairo} to {@city = Seattle}
- Get me 2 tickets for a flight to {@city = Bengaluru}
- Purchase ticket from {@city = Washington} to {@city = Tampa Bay}

當使用者說類似「 我需要從倫敦預訂到馬德里 的航班」時,LUIS 將偵測到「bookFlight」意圖,並將倫敦和馬德里提取為城市實體。

角色 基本上是一層額外的內容資訊,您可以新增至機器學習實體,也可以從內容中學習。 下列範例語句顯示與城市實體相關聯的出發和目的地角色:

- Book a flight from {@city:departure = Cairo} to {@city:destination = Seattle}

機器學習實體也可能相當複雜,因為它們具有彼此相關的實體階層。 例如,您可以有類似 pizzaOrder 具有下列子系實體的實體:數量、大小、地殼、配料等等。

您可以定義子實體,方法是在符號 (@) 前面加上虛線 (@) 並縮排,如下列範例所示:

@ prebuilt number
@ list sizeList
@ list crustList
@ list toppingList

@ ml pizzaOrder
    - @ number Quantity
    - @ sizeList Size
    - @ crustList Crust
    - @ toppingList Topping

在上述範例中,數位實體是 預先建置的實體 。 其餘實體都是 清單實體

下一個範例示範機器學習實體的定義,以及具有 fromAddresstoAddress 作為兩個 address 角色,以及子系。

@ list cityList
@ prebuilt number
@ prebuilt geographyV2
@ regex regexZipcode = /[0-9]{5}/
@ ml address hasRoles fromAddress, toAddress
@ address =
    - @ number 'door number'
    - @ ml streetName
    - @ ml location usesFeature geographyV2
        - @ cityList city
        - @ regexZipcode zipcode

預建的實體

預先建置的 LUIS 實體是由系統所定義。 這可節省您的工作,因為它們具有高品質,並提供較容易在程式中使用的正規化值。 例如,片語 「one thousand and two」 會變成數位 1002。 支援下列 LUIS [prebuilt entity][prebuilt-entity] 類型:

  • 年齡
  • datetimeV2
  • 維 度
  • 電子郵件
  • geographyV2
  • keyPhrase
  • money
  • 數值
  • 序數
  • ordinalV2
  • percentage
  • personName
  • phonenumber
  • 溫度
  • url
  • Datetime

以下是如何定義預先建置實體的範例:

@ prebuilt number 
@ prebuilt datetimeV2
@ prebuilt age

列出實體

[列出實體][list-entity] 代表固定且封閉的一組相關單字及其同義字。 當辨識任何對應的同義字時,會傳回正規化值。 它們會區分大小寫,並根據完全相符的文字進行擷取。

下列範例顯示定義清單實體的語法:

@ list <entityName>  =
    - <normalized-value> :
        - <synonym1>
        - <synonym2>
        - ...
    - <normalized-value> :
        - <synonym1>, <synonym2>, ...

pizzaOrder從機器學習實體一節擴充範例,以下是大小和殼層子實體的清單範例:

@ list sizeList = 
    - Extra Large :
        - extra large
        - XL
        - xl
        - huge
        - massive
    - Large:
        - large
        - big
    - Medium :
        - medium
        - regular
    - Small :
        - small
        - smallest
        - individual

@ list crustList = 
    - Stuffed Crust :
        - stuffed crust
        - stufffed crust
    - Thin :
        - thin
        - thin crust
    - Thick :
        - thick
        - thick crust
        - Deep Dish
        - deep dish

提示

由於清單實體需要擷取完全相符專案,因此您的結果可能會藉由新增常見的拼錯來改善。 拼字錯誤的其中一個常見原因是輸入錯誤的結果,例如上述範例中的雙字母三倍,如「填充地殼」。

使用清單實體時,您應該直接在語句中包含清單中的值,但您不需要為清單實體加上標籤,不過您仍然可以在模式 中使用 它們做為位置持有者。 下列範例顯示具有清單值的語句:

- I'd like to order a large pepperoni stuffed crust pizza.

正則運算式實體

[正則運算式實體][regular-expression-entity] 會根據您提供的正則運算式字元模式擷取實體。 正則運算式最適合結構化文字或特定格式預期的英數位元值預先定義的序列。 例如:

實體 規則運算式 範例
航班編號 flight [A-Z] {2} [0-9]{4} 正式發行前小眾測試版 AS 1234
信用卡號碼 [0-9]{16} 5478789865437632

以下是正則運算式實體定義的範例:

> Flight Number regular expression entity definition
@ regex flightNumber = /flight [A-Z]{2} [0-9]{4}/

> Credit Card Number regular expression entity definition
@ regex creditCardNumber = /[0-9]{16}/

角色

角色是以語句內的內容為基礎,為實體命名別名。 角色可以搭配任何預先建置或自訂實體類型使用,並用於範例語句和模式。

在下列範例中, 位置 實體有兩個角色, origindestination

實體 角色 目的
位置 origin 飛機從哪裡出發
位置 destination 飛機降落的地方

.lu 檔案格式的角色可以明確或隱含定義。 明確角色定義遵循標記法:

@ <entityType> <entityName> [hasRole[s]] role1, role2, ...

以下是您可以明確定義實體及其角色的各種方式:

> # ml entity definition with roles
> the following are 4 different approaches to define roles:

@ ml name role1, role2

@ ml name hasRoles role1, role2

@ ml name
@ name hasRoles role1, role2

@ ml name
@ name hasRole role1
@ name hasRole role2

您也可以使用下列格式,直接在模式和加上標籤的語句中定義角色:

{@<entityName>:<roleName>}

您可以在下列範例中看到角色 userName:firstNameuserName:lastName 隱含定義的方式:

# getUserName
- My first name is {@userName:firstName=vishwac}
- My full name is {@userName:firstName=vishwac} {@userName:lastName=kannan}
- Hello, I'm {@userName:firstName=vishwac}
- {@userName=vishwac} is my name

@ ml userName

模式中 ,您可以使用標記法來使用 {<entityName>:<roleName>} 角色。 以下為範例:

# getUserName
- call me {name:userName}
- I'm {name:userName}
- my name is {name:userName}

您也可以在模式中定義實體的多個角色,如下所示:

> Roles can be specified for list entity types as well - in this case fromCity and toCity are added as roles to the 'city' list entity defined further below

# BookFlight
- book flight from {city:fromCity} to {city:toCity}
- [can you] get me a flight from {city:fromCity} to {city:toCity}
- get me a flight to {city:toCity}
- I need to fly from {city:fromCity}

$city:Seattle=
- Seattle
- Tacoma
- SeaTac
- SEA

$city:Portland=
- Portland
- PDX

模式

[模式][] 可讓您涵蓋大量應比對的範例,方法是建立具有應找到實體位置之位置的語句。 模式是標記層級正則運算式,具有實體的地點持有者。 如果語句具有任何實體位置持有者或模式語法,則會將其解譯為模式。 否則,它會解譯為定型機器學習的語句。

實體位置持有者可以對應至任何類型的實體,或可由模式本身定義,例如當模式中的區段是查看周圍單字所識別的實體時。

模式語法

.lu 檔案格式支援 LUIS [模式語法][]。 模式語法是內嵌在語句中的範本。 範本應該同時包含您想要比對的字組和實體,以及您想要忽略的文字和標點符號。 範本不是正則運算式。

模式中的實體會以大括弧括住。 {} 模式可以包含實體,以及具有角色的實體。 [Pattern.any][pattern-any] 是只用于模式的實體。

函數 語法 巢狀層級 範例
實體 {} -括弧 2 Where is form {entity-name}?
選用 [] - 方括弧
:選擇性和分組之任意組合的巢狀層級有 3 個限制
2 The question mark is optional [?]
群組 () - 括弧 2 is (a \| b)
|- 垂直橫條(管道)
在垂直線中限制為 2(或) 在一個群組中
- Where is form ({form-name-short} \| {form-name-long} \| {form-number})
語句的開頭和/或結尾 ^ - 插入號 - ^begin the utterance
the utterance is done^
^strict literal match of entire utterance with {number} entity^

如需詳細資訊,請參閱 LUIS 檔中的 [模式語法][] 文章。

下列範例示範將視為模式 alarmTime 所定義實體的定義:

# DeleteAlarm
- delete the {alarmTime} alarm

語句「刪除上午 7 點警示」會符合模式,而且會辨識 alarmTime 「7am」 的實體。

相反地,下列範例是 加上 標籤的語句,其中 alarmTime 是機器學習實體,因為它具有標示值為 7AM

# DeleteAlarm
- delete the {alarmTime=7AM} alarm

您無法在相同的語句中混合實體標籤和實體放置持有者,但您可以使用對應至機器學習實體的地點持有者。

提示

您應該先瞭解 Bot 在新增模式之前如何回應使用者輸入,因為模式的加權會比範例語句更重,而且會扭曲信賴度。 在模型設計開始時,新增它們並無任何傷害,但在模型測試語句之後,查看每個模式變更模型的方式會比較容易。

片語清單

[片語清單][phrase-list] 是一份單字或片語清單,可協助尋找您嘗試識別的概念。 清單不區分大小寫。 片語清單有兩個不同的用途:

  • 擴充字典 :當您定義片語清單且稱為 不可 互換時,這是預設值。 多字片語會成為機器學習的功能,需要較少的範例才能學習。 在此使用方式中,階段清單的成員之間沒有關聯性。
  • 定義同義字:可交換的 片語清單是用來定義同 義字的同義字 。 此使用方式有助於使用較少的範例進行一般化。 清單中的任何片語都會產生與機器學習相同的功能。 若要使用,需要在片語清單定義中指定 interchangeable@ phraselist <Name>(interchangeable)

注意

功能 可以是與意圖或實體相關聯的片語清單或實體,以強調該功能在正確偵測使用者意圖中的重要性。 如需詳細資訊,請參閱 新增片語清單做為功能

如需何時及如何使用片語清單的其他資訊,包括所使用的一般案例,請參閱 [建立概念的片語清單][phrase-list]。

您可以使用下列標記法來定義片語清單:

@ phraselist <Name>
    - <phrase1>
    - <phrase2>

以下是用來擴充字典的片語清單範例:

@ phraseList newTerms=
- surf the sky
- jump on the beam
- blue sky pajamas

片語清單也可以用來將同義字標示為可互換。

@ phraseList Want(interchangeable) =
    - require, need, desire, know

> You can also break up the phrase list values into a bulleted list
@ phraseList Want(interchangeable) =
    - require
    - need
    - desire
    - know

根據預設,片語清單可供所有學習的意圖和實體使用。 有三種可用性狀態:

可用性狀態 描述
enabledForAllModels (預設值)當片語清單標示為 enabledForAllModels 時,不論您是否特別將它列為功能,都可以供所有模型使用。
disabledForAllModels 當片語清單標示為 disabledForAllModels 時,只有在特別列為特徵時,才會在模型中使用。
停用 當片語清單標示為 disabled 時,不會在任何地方使用,包括特別列為功能的任何模型。 這可讓您輕鬆關閉片語清單,以查看在沒有片語的情況下運作得有多好。

片語清單預設為全域可用,也可以使用 關鍵字特別設定 enabledForAllModels

@ phraselist abc enabledForAllModels

將片語清單設定為 disabledForAllModels 的兩個範例:

@ phraselist abc disabledForAllModels

> You can also use this approach
@ phraselist question(interchangeable) =
    - are you
    - you are

@ question disabledForAllModels

將片語清單設定為 disabled 時,即使特別列為功能,也不會使用它:

> phrase list definition, temporarily set to disabled to measure its impact

@ phraselist yourPhraseList disabled

> phrase list as feature to intent, won't be used

@ intent yourIntent usesFeature yourPhraseList

片語清單可作為特定意圖和實體的功能,如下一節所述。

將功能新增至意圖和實體

機器學習的運作方式是取得特徵,並瞭解它們與範例語句中所需意圖或實體的關聯性。 根據預設,功能只是構成語句的字組。 片語清單提供將多個單字組成新功能的方法;這可讓機器學習從較少的範例中更一般化。 根據預設,片語清單是全域的,並套用至所有機器學習模型,但您也可以將它們系結至特定意圖或實體。 您也可以使用意圖或實體作為功能,將其他意圖偵測為實體。 這提供模組化,讓您可以從更簡單的建置組塊建置更複雜的概念。

注意

在機器學習中,功能是文字,描述系統觀察和學習之資料的辨別特性或屬性。 片語清單、意圖和實體可用來做為功能,如本章節和下列各節所述。

您可以使用 關鍵字,將功能新增至任何學習意圖或實體 usesFeature

新增片語清單作為功能

片語清單可以新增為意圖或實體的功能。 這有助於這些特定意圖或實體,而不會影響其他意圖和實體。 以下範例說明如何將片語清單定義為另一個模型的一項功能:

> phrase list definition

@ phraseList PLCity(interchangeable) =
    - seattle
    - space needle
    - SEATAC
    - SEA

> phrase list as feature to intent 

@ intent getUserProfileIntent usesFeature PLCity

> phrase list as a feature to an ml entity

@ ml myCity usesFeature PLCity

@ regex regexZipcode = /[0-9]{5}/

> a phrase list is used as a feature in a hierarchal entity

@ ml address fromAddress, toAddress
@ address =
    - @ number 'door number'
    - @ ml streetName
    - @ ml location
        - @ ml city usesFeature PLCity
        - @ regexZipcode zipcode

將實體或意圖新增為功能

以下是如何使用 新增意圖和實體作為功能的 usesFeature 範例:

> entity definition - @ <entityType> <entityName> [<roles>]

@ prebuilt personName
@ prebuilt age

> entity definition with roles

@ ml userName hasRoles fistName, lastName

> add an entity as a feature to another entity

@ userName usesFeature personName

> add an entity as feature to an intent

@ intent getUserNameIntent usesFeature personName

> Intent definition

# getUserNameIntent
- utterances

> multiple entities as a feature to a model

@ intent getUserNameIntent usesFeature age, personName

> intent as a feature to another intent

@ intent getUserProfileIntent usesFeature getUserNameIntent

# getUserProfileIntent
- utterances

中繼資料

您可以在 .lu 檔案中包含與 LUIS 應用程式或 QnA Maker 知識庫相關的中繼資料。 這有助於引導剖析器正確處理 LU 內容。 中繼資料通常會新增至 .lu 檔案的開頭。

以下說明如何使用 !# 來定義組態資訊: >

> !# @<property> = <value>
> !# @<scope>.<property> = <value>
> !# @<scope>.<property> = <semicolon-delimited-key-value-pairs>

請注意,透過 CLI 引數明確傳入的任何資訊都會覆寫 .lu 檔案中的資訊。

> LUIS application information
> !# @app.name = my luis application
> !# @app.desc = description of my luis application
> !# @app.versionId = 1.0
> !# @app.culture = en-us
> !# @app.luis_schema_version = 7.0.0
> !# @app.settings.NormalizePunctuation = true
> !# @app.settings.NormalizeWordForm = true
> !# @app.settings.UseAllTrainingData = true
> !# @app.tokenizerVersion = 1.0.0

如需上述範例中使用的應用程式中繼資料值描述,請參閱下表。 如需 LUIS 中 app.settings 的資訊,請參閱 LUIS 檔中的 [應用程式和版本設定][luis-metadata]。

中繼資料 描述
Name 您的應用程式名稱
VersionId 該特定版本的名稱
文化特性 應用程式所使用的語言
結構描述版本 LUIS 架構會在 LUIS 中新增新功能或設定時更新。 使用您在建立或更新 LUIS 模型時所使用的架構版本號碼。

外部參考

下列各節詳細說明如何建立 本機檔案 URI 參考。

本機檔案參考

注意

Azure AI QnA Maker 將于 2025 年 3 月 31 日淘汰。 從 2022 年 10 月起,您將無法建立新的 QnA Maker 資源或知識庫。 較新版的問題和解答功能現在隨附於 Azure AI 語言。

自訂問題解答是 Azure AI 語言的一項功能,是 QnA Maker 服務的更新版本。 如需 Bot Framework SDK 中問答支援的詳細資訊,請參閱 自然語言理解

參考 .lu 檔案。 遵循 Markdown 連結語法。 支援的參考包括:

  • 透過 [link name](<.lu file name>) 參考另一個 .lu 檔案。 參考可以是包含 .lu 檔案的絕對路徑或相對路徑。
  • 透過下列方式支援參考其他 .lu 檔案的資料夾:
    • [link name](<.lu file path>*):在指定的絕對或相對路徑下尋找 .lu 檔案
    • [link name](<.lu file path>**):以遞迴方式在指定的絕對或相對路徑下尋找 .lu 檔案,包括子資料夾。
  • 您也可以將參考新增至意圖區段下特定檔案中定義的語句,或新增為 QnA 配對。
    • [link name](<.lu file path>#<INTENT-NAME>):在 .lu 檔案中尋找 INTENT-NAME > 下 < 的所有語句,並將其新增至指定參考的語句清單。
    • [link name](<.lu file path>#<INTENT-NAME>*utterances*):在 .lu 檔案中尋找 INTENT-NAME > 底下 < 的所有語句(非模式),並將其新增至指定參考的語句清單。
    • [link name](<.lu file path>#<INTENT-NAME>*patterns*):在 .lu 檔案中尋找 INTENT-NAME > 底下 < 的所有模式(非語句),並將其新增至指定參考的模式清單。
    • [link name](<.lu file path>#*utterances*):尋找 .lu 檔案中的所有語句,並將其新增至指定參考的語句清單。
    • [link name](<.lu file path>#*patterns*):尋找 .lu 檔案中的所有模式,並將其新增至指定參考的語句清單。
    • [link name](<.lu file path>#*utterancesAndPatterns*):尋找 .lu 檔案中的所有語句和模式,並將其新增至指定參考的語句清單。
    • [link name](<.qna file path>#$name?):從 .qna 內容中的特定改變定義中尋找所有變更,並將其新增至指定參考的語句清單。
    • [link name](<.qna file path>#*alterations*?):從 .qna 內容尋找所有變更,並將其新增至指定參考的語句清單。
    • [link name](<.qna file path>#?question-to-find?):從特定問題尋找所有變化問題,並將其新增至指定參考的語句清單。 請注意,問題中的任何空格都必須取代為 - 字元。
    • [link name](<.qna file path>#*answers*?):尋找所有答案,並將其新增至指定參考的語句清單。

以下是上述參考的範例:

> You can include references to other .lu files

[All LU files](./all.lu)

> References to other files can have wildcards in them

[en-us](./en-us/*)

> References to other lu files can include subfolders as well.
> /** indicates to the parser to recursively look for .lu files in all subfolders as well.

[all LU files](../**)

> You can include deep references to intents defined in a .lu file in utterances

# None
- [None uttearnces](./all.lu#Help)

> With the above statement, the parser will parse all.lu and extract out all utterances associated with the 'Help' intent and add them under 'None' intent as defined in this file.

> NOTE: This **only** works for utterances as entities that are referenced by the uttearnces in the 'Help' intent won't be brought forward to this .lu file.

# All utterances
> you can use the *utterances* wild card to include all utterances from a lu file. This includes utterances across all intents defined in that .lu file.
- [all.lu](./all.lu#*utterances*)
> you can use the *patterns* wild card to include all patterns from a lu file.
> - [all.lu](./all.lu#*patterns*)
> you can use the *utterancesAndPatterns* wild card to include all utterances and patterns from a lu file.
> - [all.lu](./all.lu#*utterancesAndPatterns*)

> You can include wild cards with deep references to QnA maker questions defined in a .qna file in utterances

# None
- [QnA questions](./*#?)

> With the above statement, the parser will parse **all** .lu files under ./, extract out all questions from QnA pairs in those files and add them under 'None' intent as defined in this file.

> You can include deep references to QnA maker questions defined in a .qna file in utterances

# None
- [QnA questions](./qna1.qna#?)

> With the above statement, the parser will parse qna1.lu and extract out all questions from QnA pairs in that file and add them under 'None' intent as defined in this file.

URI 參考

以下是如何建立 URI 參考的範例:

> URI to LU resource
[import](http://.../foo.lu)

# intent1
> Ability to pull in specific utterances from an intent
- [import](http://.../foo.lu#None)

# intent2
> Ability to pull in utterances or patterns or both from a specific intent 'None'
- [import](http://..../foo.lu#None*utterances*)
- [import](http://..../bar.lu#None*patterns*)
- [import](http://..../taz.lu#None*utterancesandpatterns*)

# intent3
> Ability to pull in all utterances or patterns or both across all intents
- [import](http://..../foo.lu#*utterances*)
- [import](http://..../bar.lu#*patterns*)
- [import](http://..../taz.lu#*utterancesandpatterns*)

其他資訊