iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 22
1
Microsoft Azure

白眼狼的30天Azure跳槽計畫系列 第 22

Day [22] Language Understanding Intelligent Service (LUIS)-建立應用程式

建立LUIS應用程式

繼續昨天我們已經建立好Azure LUIS 資源(Day [21] Language Understanding Intelligent Service (LUIS)-建置)

登入LUIS入口網站後從工具列中選取Subscription與昨天建立的Authoring resource
點選 [+ New app for conversation]。
https://ithelp.ithome.com.tw/upload/images/20201007/20108281hutZyMy7XA.jpg

在視窗中進行應用程式設定,填寫Name(應用程式名稱), Culture選擇(Chinese), Prediction resource,然後選取 [Done]。

https://ithelp.ithome.com.tw/upload/images/20201007/20108281njlY6myvnl.jpg

完成後點可看見以下畫面,點選剛剛建立的應用程式
https://ithelp.ithome.com.tw/upload/images/20201007/20108281rXqIulmALt.jpg

Create intents

本章節會使用到LUIS的觀念與關鍵字(可參考文章-Day [20] Language Understanding Intelligent Service (LUIS)-技術分析)

建立 LUIS 應用程式之後,現在需要建立Intents(意圖)。 Intents是對使用者的文字進行分類的方式之一。
點選 [+ Create]

https://ithelp.ithome.com.tw/upload/images/20201007/20108281D6gEiqdJSr.jpg

輸入intent名稱 我們取名叫做 ask4Mask 用來解決詢問口罩特約商店的問題(可參考: Why LUIS (Language Understanding Intelligent Service) ?-Chatbot前情提要)
點選[Done]後可看見以下畫面:

https://ithelp.ithome.com.tw/upload/images/20201007/20108281LYJQUpTkvv.jpg

新增範例語句

現在我們可以詢問口罩資訊的範例語句填入該intent
依序填入相關使用者可能輸入的語句如下圖:
https://ithelp.ithome.com.tw/upload/images/20201007/20108281G7DV2tEC4W.jpg

Create Entities

現在我們需要替語句標示重要的關鍵字Entities(實體),點選導覽列Entities,輸入Entities名稱
選擇Machine learned,點選Create

https://ithelp.ithome.com.tw/upload/images/20201007/20108281S59VRvZMxX.jpg

Entities通常用在找尋與劇中的重要資訊或參數,如訂餐的餐點項目,特定格式的資訊(電話,住址等),查詢品項名稱等,根據應用程式需求可自行設計 這裡我們以口罩為例作為測試。

建立完成後隨後我們將畫面回到Intents標注我們剛剛輸入的範例語句中的Entities,我們將語句中預標註為Enties的詞句反白後可以選擇Entities種類進行標注,依序標注剛剛輸入的語句如下圖:
https://ithelp.ithome.com.tw/upload/images/20201007/20108281kEbSiNMNRE.jpg

新增 None 意圖

在我們建立intents之前,可以發現LUIS已經預設了一個None intents,這是為了定義後援意圖,我們將一些與應用程式完全無關的語句新增至 None 意圖。

https://ithelp.ithome.com.tw/upload/images/20201007/20108281U7wzrHnYkB.jpg

設定完成後點選 LUIS 網站的右上方 [Train] 按鈕。亮綠燈即訓練完成
https://ithelp.ithome.com.tw/upload/images/20201007/201082816tN85BxUeF.jpg

明天將開始使用我們建立的LUIS應用程式,解決Chatbot語意理解的問題!!


上一篇
Day [21] Language Understanding Intelligent Service (LUIS)-建置
下一篇
Day [23] Language Understanding Intelligent Service (LUIS)-測試&部署
系列文
白眼狼的30天Azure跳槽計畫30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言