EntityAnalysis, Version 2 model in natural language API

Hello,

could anyone share the python code on how to get natural language API to use version 2 for Entity  Sentiment Analysis?
The Demo can be run for that, but it seems like in the docs this part is missing:
https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeEntitySentiment

However, for the classification, it is possible, as it is described here: 
https://www.googlecloudcommunity.com/gc/AI-ML/Version-2-model-in-natural-language-API/m-p/484641

Thanks 

0 7 555
7 REPLIES 7

When using the classifyText method of the API, the classification models are available. However, for Entity Sentiment Analysis there is no mention of available options or models that can be declared. Can you add more details of your use case to review?

I was using a demo from:
https://cloud.google.com/natural-language

And here the API provides an example for the V2 of the model, including Entity Analysis for the German
However, when I go to the docs (https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeEntitySentiment)
I can`t see the option to use V2 model for Entity Analysis, one V1
However, for the Classification Model there is an option: https://cloud.google.com/natural-language/docs/reference/rest/v1/ClassificationModelOptions

So, my question is: can I use V2 model for the Entity Analysis? 
Thanks 

The Natural Language API documentation includes all available code samples. Could you direct me to the one you refer to? Most likely there is some clarification to make, as there is no mention of a V2 model that can be used.

I am interested in the:
https://cloud.google.com/natural-language/docs/samples/language-entities-text

However, I want to use V2 model for Entity Analysis, as it supports German
Is it possible to use V2 here ? 

Thanks

German language support is not available for Entity Sentiment Analysis, as the only listed languages for it are English, Japanese, and Spanish. There might have been some confusion with the V2 model for Content Classification, since it includes broader language options. However, this model is only for Content Classification, not for Entity Sentiment Analysis, which offers no such option.

Keep in mind that standalone Sentiment analysis and Entity analysis do offer support for German, in case you need either of those API features instead. As a note, you can raise a Feature Request in Google’s Issue Tracker. It would be brought to the attention of the appropriate teams to implement support in the future; however, there’s no assurance of an ETA.

Can you send me a link please to a mentioned standalone Entity analysis service I can use for  German? 
Thanks

For standalone Entity Analysis, you can review the following documentation overview. Language support for this API feature can be seen here, and German is listed under the supported languages.