- Navigate to the Azure Portal
- On the Azure Portal, select +Create a Resource
- In the New window, select AI + Machine Learning
- In the Featured frame, select Text Analytics
- In the Create window, make the following selections
- Name: [Create a unique resource name]
- Subscription: [Select your Azure subscription]
- Location: [Select the location closest to you]
- Pricing Tier: F0 (5K Transactions per 30 days)
- This is a free tier
- Resource Group: [Create a unique resource group name]
- In the Create window, select Create
- On the Azure Portal, select the bell-shaped notification icon
- Stand by while the Notifications window says Deployment in progress...
- Once the deployment has finished, on the Notifications window, select Go to resource
- On the Resource page, select Keys
- On the Keys page, locate KEY 1
- We will use this API Key in our app
- In the Resource page, select Overview
- On the Overview page, locate the Endpoint
- We will use this Url in our app
- In the hotelsweb solution, open
appsettings.json
- In
appsettings.json
, enter the value of your TextAnalytics API key forTextAnalyticsApiKey
- E.g.
"TextAnalyticsApiKey": "[Your Api Key]",
- E.g.
- In
appsettings.json
, enter the value of your TextAnalytics API Base url forTextAnalyticsBaseUrl
- E.g.
"TextAnalyticsBaseUrl": "https://westus.api.cognitive.microsoft.com",
- Note: Do not enter the full url of the API endpoint; only provide the base url.
- E.g.
- In the hotelsweb solution, open
appsettings.Development.json
- In
appsettings.Development.json
, enter the value of your TextAnalytics API key forTextAnalyticsApiKey
- E.g.
"TextAnalyticsApiKey": "[Your Api Key]",
- E.g.
- In
appsettings.Development.json
, enter the value of your TextAnalytics API Base url forTextAnalyticsBaseUrl
- E.g.
"TextAnalyticsBaseUrl": "https://westus.api.cognitive.microsoft.com",
- Note: Do not enter the full url of the API endpoint; only provide the base url.
- E.g.
- Build/Deploy
hotelsweb.csproj
locally - On the Hotels360 website, click Reviews from the top menu
- On the Reviews page, enter a positive review
- Example positive review: "Best hotel ever!"
- On the Review page, ensure that a happy emoji appears
- On the Hotels360 website, click Reviews from the top menu
- On the Reviews page, enter a negative review
- Example negative review: "Terrible hotel. Will never stay here again!"
- On the Review page, ensure that a sad emoji appears
- On the Hotels360 website, click Reviews from the top menu
- On the Reviews page, enter a neutral review
- Example neutral review: "This is a big hotel"
- On the Review page, ensure that a neutral emoji appears
- Build/Deploy
hotelsweb.csproj
to the Azure Web App instance created earlier - On the Hotels360 website, click Reviews from the top menu
- On the Reviews page, enter a positive review
- Example positive review: "Best hotel ever!"
- On the Review page, ensure that a happy emoji appears
- On the Hotels360 website, click Reviews from the top menu
- On the Reviews page, enter a negative review
- Example negative review: "Terrible hotel. Will never stay here again!"
- On the Review page, ensure that a sad emoji appears
- On the Hotels360 website, click Reviews from the top menu
- On the Reviews page, enter a neutral review
- Example neutral review: "This is a big hotel"]
- On the Review page, ensure that a neutral emoji appears