Skip to content

Commit e6401f6

Browse files
authored
Merge pull request #66 from limotley/update-tanuget
Upgraded Text Analytics nuget package
2 parents e1199d6 + c6b7f1a commit e6401f6

File tree

7 files changed

+12
-16
lines changed

7 files changed

+12
-16
lines changed

demos/PersonalizerBusinessDemo/PersonalizerBusinessDemo/PersonalizerBusinessDemo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ItemGroup>
1515
<PackageReference Include="Microsoft.AspNetCore.App" />
1616
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
17-
<PackageReference Include="Microsoft.Azure.CognitiveServices.Language.TextAnalytics" Version="2.8.0-preview" />
17+
<PackageReference Include="Microsoft.Azure.CognitiveServices.Language.TextAnalytics" Version="3.0.0" />
1818
<PackageReference Include="Microsoft.Azure.CognitiveServices.Personalizer" Version="0.8.0-preview" />
1919
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
2020
<PackageReference Include="UAParser" Version="3.1.36" />

demos/PersonalizerBusinessDemo/PersonalizerBusinessDemo/Repositories/CognitiveTextAnalyzer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public async Task<IList<string>> GetKeyPhrasesAsync(string inputText)
4242
private async Task<IList<IList<string>>> GetKeyPhrasesBatchAsync(IList<string> batchInputText)
4343
{
4444
KeyPhraseBatchResult result = await textAnalyticsClient.KeyPhrasesAsync(
45-
new MultiLanguageBatchInput(
45+
null, new MultiLanguageBatchInput(
4646
batchInputText.Select((text, index) => new MultiLanguageInput("en", $"{index + 1}", text)).ToList()
4747
)
4848
);
@@ -52,7 +52,7 @@ private async Task<IList<IList<string>>> GetKeyPhrasesBatchAsync(IList<string> b
5252
private async Task<IList<double?>> GetSentimentBatchAsync(IList<string> batchInputText)
5353
{
5454
SentimentBatchResult result = await textAnalyticsClient.SentimentAsync(
55-
new MultiLanguageBatchInput(
55+
null, new MultiLanguageBatchInput(
5656
batchInputText.Select((text, index) => new MultiLanguageInput("en", $"{index + 1}", text)).ToList()
5757
)
5858
);

demos/PersonalizerBusinessDemo/PersonalizerBusinessDemo/appsettings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
}
66
},
77
"AllowedHosts": "*",
8-
"PersonalizationEndpoint": "https://westus2.api.cognitive.microsoft.com/",
9-
"TextAnalyticsEndpoint": "https://westus2.api.cognitive.microsoft.com/text/analytics/v2.0"
8+
"PersonalizationEndpoint": "",
9+
"TextAnalyticsEndpoint": ""
1010
}
11+

demos/PersonalizerDemo/PersonalizerDemo/CognitiveTextAnalyzer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public async Task<IList<string>> GetKeyPhrasesAsync(string inputText)
4242
private async Task<IList<IList<string>>> GetKeyPhrasesBatchAsync(IList<string> batchInputText)
4343
{
4444
KeyPhraseBatchResult result = await textAnalyticsClient.KeyPhrasesAsync(
45-
new MultiLanguageBatchInput(
45+
null, new MultiLanguageBatchInput(
4646
batchInputText.Select((text, index) => new MultiLanguageInput("en", $"{index + 1}", text)).ToList()
4747
)
4848
);
@@ -52,7 +52,7 @@ private async Task<IList<IList<string>>> GetKeyPhrasesBatchAsync(IList<string> b
5252
private async Task<IList<double?>> GetSentimentBatchAsync(IList<string> batchInputText)
5353
{
5454
SentimentBatchResult result = await textAnalyticsClient.SentimentAsync(
55-
new MultiLanguageBatchInput(
55+
null, new MultiLanguageBatchInput(
5656
batchInputText.Select((text, index) => new MultiLanguageInput("en", $"{index + 1}", text)).ToList()
5757
)
5858
);

demos/PersonalizerDemo/PersonalizerDemo/PersonalizerDemo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.AspNetCore.App" />
1212
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
13-
<PackageReference Include="Microsoft.Azure.CognitiveServices.Language.TextAnalytics" Version="2.8.0-preview" />
13+
<PackageReference Include="Microsoft.Azure.CognitiveServices.Language.TextAnalytics" Version="3.0.0" />
1414
<PackageReference Include="Microsoft.Azure.CognitiveServices.Personalizer" Version="0.8.0-preview" />
1515
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
1616
<PackageReference Include="UAParser" Version="3.1.36" />

demos/PersonalizerDemo/PersonalizerDemo/Startup.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Net.Http;
5-
using System.Threading.Tasks;
6-
using Microsoft.AspNetCore.Builder;
1+
using Microsoft.AspNetCore.Builder;
72
using Microsoft.AspNetCore.Hosting;
83
using Microsoft.AspNetCore.Http;
94
using Microsoft.AspNetCore.Mvc;

demos/PersonalizerDemo/PersonalizerDemo/appsettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
}
66
},
77
"AllowedHosts": "*",
8-
"PersonalizationEndpoint": "https://westus2.api.cognitive.microsoft.com/",
9-
"TextAnalyticsEndpoint": "https://westus2.api.cognitive.microsoft.com/text/analytics/v2.0"
8+
"PersonalizationEndpoint": "",
9+
"TextAnalyticsEndpoint": ""
1010
}

0 commit comments

Comments
 (0)