Skip to content

Microsoft Azure Cognitive Services | Applied AI Services を利用した 言語分析アプリ

Notifications You must be signed in to change notification settings

ayako/CogServicesLanguageSamples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Microsoft Azure Cognitive Services | Applied AI Services を利用した 自然言語処理アプリ

"人工知能 API" Microsoft Azure Cognitive ServicesMicrosoft Azure Applied AI Services を使うと、自然言語処理や分析を行うエンジンをノーコーディングで利用、作成できます。

  • Text Analytics は、自然言語処理を行って、文章中のキーワードやエンティティの抽出、センチメント分析、文章要約を行うエンジンをすぐに Web API で利用できます。

サンプルの動作確認

サンプルの利用方法

Cognitive Services の準備

Text Analytics を使う場合

Azure Portal から Text Analytics の エンドポイント(URL) と キー (Subscription Key) を取得しておきます。 Key1 に表示されている文字列が キー (Subscription Key) になります。

Cognitive Services for Language を使う場合

Azure Portal から Cognitive Services for Language の エンドポイント(URL) と キー (Subscription Key) を取得しておきます。 Key1 に表示されている文字列が キー (Subscription Key) になります。

Summarize - HTML (JavaScript)

textanalytics_script.js

以下の箇所を取得したエンドポイントおよびキーで書き換えます。

// Text Analytics の Subscription Key と URL をセット
// Azure Portal 画面に表示される URL および Key をコピーしてください
var subscriptionKey = "YOUR_API_KEY";
var endpoint = "https://YOUR_SERVICE_URL.cognitiveservices.azure.com/";

TextAnalyticsSummarize.html を開き、文章を入力して動作を確認できます。

Language Detection | Sentiment - Azure Functions (NodeJS/JavaSscript)

TextAnalyticsFunc202207 フォルダーを Visual Studio Code などで開きます。

index.js

以下の箇所を取得したエンドポイントおよびキーで書き換えます。

const key = "YOUR_API_KEY";
const endpoint = "https://YOUR_SERVICE_NAME.cognitiveservices.azure.com/"

npm start で起動します。

以下の環境で構築、動作確認をしています;

About

Microsoft Azure Cognitive Services | Applied AI Services を利用した 言語分析アプリ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published