Azure人工智能认知服务(AI·机器学习)
生活随笔
收集整理的這篇文章主要介紹了
Azure人工智能认知服务(AI·机器学习)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
最近CSDN開展了《0元試用微軟 Azure人工智能認知服務,精美禮品大放送》,當前目前活動還在繼續,熱心的我已經第一時間報名參與,只不過今天才有時間實際的試用。
目前我在試用了 語音轉文本、文本轉語音、語音翻譯 功能后,決定做一個實時語音翻譯機,使用后效果是真不錯。
官網登錄地址【https://portal.azure.cn/】
目錄
官網登錄地址【https://portal.azure.cn/】
一、環境以及用戶注冊
二、實驗測試
實驗測試一、文本分析
?
實驗測試二、翻譯工具
?實驗測試三、語言理解
一、環境以及用戶注冊
登錄頁面效果,左側有菜單【三】
?
?選擇【所有服務】
?
?選擇【AI·機器學習】
?
這里可以看到有很多的可以直接使用的服務,非常方便。
點擊【認知服務多服務賬號】
?
?
二、實驗測試
實驗測試一、文本分析
內容審查器
?點擊【創建】,輸入以下內容,點擊下一步:
?直接點擊下一步:
選擇【開】即可,點擊【查看+創建】
點擊【創建】
【下載】以及【轉到資源】
有秘鑰、有API:
秘鑰:
進入【API測試頁面】:
執行與效果:
實驗測試二、翻譯工具
?創建用戶同實驗一操作。
?
轉到資源:
?有秘鑰和【API】
直接打開【API】參考,創建個C#項目或【Python】的項目。
?編碼是現成的,直接搞就行。?
import requests, uuid, json# Add your subscription key and endpoint subscription_key = "YOU ARE BAST" endpoint = "https://api.translator.azure.cn"# Add your location, also known as region. The default is global. # This is required if using a Cognitive Services resource. location = "YOUR_WIn"path = '/translate' constructed_url = endpoint + pathparams = {'api-version': '3.0','from': 'en','to': ['zh'] } constructed_url = endpoint + pathheaders = {'Ocp-Apim-Subscription-Key': subscription_key,'Ocp-Apim-Subscription-Region': location,'Content-type': 'application/json','X-ClientTraceId': str(uuid.uuid4()) }# You can pass more than one object in body. body = [{'text': ''The extractive summarization feature in Text Analytics uses natural language processing techniques to locate key sentences in an unstructured text document. This feature is provided as an API for developers. They can use it to build intelligent solutions based on the relevant information extracted to support various use cases.' }] request = requests.post(constructed_url, params=params, headers=headers, json=body) response = request.json() print(json.dumps(response, sort_keys=True, ensure_ascii=False, indent=4, separators=(',', ': ')))實驗測試三、語言理解
語言理解,直接創建用戶:
?
?
有API文檔,使用【LUIS】應用測試即可。?
?
操作步驟與【json】參數都是現成的,直接復制并根據自己的需求更改即可。?
?希望對大家有所幫助。
總結
以上是生活随笔為你收集整理的Azure人工智能认知服务(AI·机器学习)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php socket(服务端与客户端)d
- 下一篇: AI创想秀,邂逅“华为云ModelArt