Skip to content

Commit 4a6112a

Browse files
committed
updating how-to and whats new
1 parent fb31ab9 commit 4a6112a

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

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

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +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` |
58-
59-
> [!IMPORTANT]
60-
> To use the latest model version in your API calls, you must specify `2021-10-01` using the model version parameter. See the reference documentation for more information.
61-
> * [REST API](https://westus2.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/Sentiment)
62-
> * [.NET](https://docs.microsoft.com/dotnet/api/azure.ai.textanalytics.analyzesentimentaction?view=azure-dotnet#properties)
63-
> * [Python](https://docs.microsoft.com/python/api/azure-ai-textanalytics/azure.ai.textanalytics.textanalyticsclient?view=azure-python#analyze-sentiment-documents----kwargs-)
64-
> * [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_)
65-
> * [JavaScript](https://docs.microsoft.com/javascript/api/@azure/ai-text-analytics/analyzesentimentoptions?view=azure-node-latest)
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)
6679

6780
### Input languages
6881

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Azure Cognitive Service for Language is updated on an ongoing basis. To stay up-
3030
* [Custom Text Classification preview](custom-classification/overview.md)
3131
* [Conversational Language Understanding preview](conversational-language-understanding/overview.md)
3232

33-
* Model version `2021-10-01` for [Sentiment Analysis and Opinion mining](sentiment-opinion-mining/overview.md), which provides:
33+
* Preview model version `2021-10-01-preview` for [Sentiment Analysis and Opinion mining](sentiment-opinion-mining/overview.md), which provides:
3434
* Improved prediction quality.
3535
* [Additional language support](sentiment-opinion-mining/language-support.md?tabs=sentiment-analysis) for the opinion mining feature.
3636
* For more information, see the [project z-code site](https://www.microsoft.com/research/project/project-zcode/).

0 commit comments

Comments
 (0)