Skip to content

Commit 7d87ca8

Browse files
authored
Merge pull request #177984 from aahill/nov-2-ta-update
Nov 2 ta update
2 parents fdc34ea + 4a6112a commit 7d87ca8

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

articles/cognitive-services/language-service/sentiment-opinion-mining/how-to/call-api.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,30 @@ If you're using the REST API, to get Opinion Mining in your results, you must in
5252

5353
By default, sentiment analysis will use the latest available AI model on your text. You can also configure your API requests to use a specific model version. The model you specify will be used to perform sentiment analysis operations.
5454

55-
| Supported Versions | latest version |
56-
|--|--|
57-
| `2019-10-01`, `2020-04-01`, `2021-10-01` | `2021-10-01` |
55+
| Supported Versions | latest Generally Available version | latest preview version |
56+
|--|--|--|
57+
| `2019-10-01`, `2020-04-01`, `2021-10-01-preview` | `2020-04-01` | `2021-10-01-preview` |
58+
59+
### Using a preview model version
60+
61+
To use the a preview model version in your API calls, you must specify the model version using the model version parameter. For example, if you were sending a request using Python:
62+
63+
```python
64+
result = text_analytics_client.analyze_sentiment(documents, show_opinion_mining=True, model_version="2021-10-01-preview")
65+
```
66+
67+
or if you were using the REST API:
68+
69+
```rest
70+
https://your-resource-name.cognitiveservices.azure.com/text/analytics/v3.1/sentiment?opinionMining=true&model-version=2021-10-01-preview
71+
```
72+
73+
See the reference documentation for more information.
74+
* [REST API](https://westus2.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/Sentiment)
75+
* [.NET](https://docs.microsoft.com/dotnet/api/azure.ai.textanalytics.analyzesentimentaction?view=azure-dotnet#properties)
76+
* [Python](https://docs.microsoft.com/python/api/azure-ai-textanalytics/azure.ai.textanalytics.textanalyticsclient?view=azure-python#analyze-sentiment-documents----kwargs-)
77+
* [Java](https://docs.microsoft.com/java/api/com.azure.ai.textanalytics.models.analyzesentimentoptions.setmodelversion?view=azure-java-stable#com_azure_ai_textanalytics_models_AnalyzeSentimentOptions_setModelVersion_java_lang_String_)
78+
* [JavaScript](https://docs.microsoft.com/javascript/api/@azure/ai-text-analytics/analyzesentimentoptions?view=azure-node-latest)
5879

5980
### Input languages
6081

articles/cognitive-services/language-service/whats-new.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ Azure Cognitive Service for Language is updated on an ongoing basis. To stay up-
3131
* [Custom Text Classification preview](custom-classification/overview.md)
3232
* [Conversational Language Understanding preview](conversational-language-understanding/overview.md)
3333

34-
* Model version `2021-10-01` for [Sentiment Analysis and Opinion mining](sentiment-opinion-mining/overview.md), which provides
34+
* Preview model version `2021-10-01-preview` for [Sentiment Analysis and Opinion mining](sentiment-opinion-mining/overview.md), which provides:
3535
* Improved prediction quality.
3636
* [Additional language support](sentiment-opinion-mining/language-support.md?tabs=sentiment-analysis) for the opinion mining feature.
3737
* For more information, see the [project z-code site](https://www.microsoft.com/research/project/project-zcode/).
38-
38+
> [!NOTE]
39+
> To use this [model version](sentiment-opinion-mining/how-to/call-api.md#specify-the-sentiment-analysis-model), you must specify it in your API calls, using the model version parameter.
40+
3941
## Next steps
4042

4143
* [What is Azure Cognitive Service for Language?](overview.md)

0 commit comments

Comments
 (0)