I founded the Vietnamese which is supported in sentiment analysis. When I try the tutorial they mentioned but with an Vietnamese sentence, it just detected Vietnam language but it not show 'sentence' and 'score'.
My code:
credentials = ServiceAccountCredentials.from_json_keyfile_name(settings.GOOGLE['nlp_client_secrets'],scopes=settings.GOOGLE['nlp_scope'])
http = Http()
http = credentials.authorize(http)
service = discovery.build("language", "v1", http=http, discoveryServiceUrl=DISCOVERY_URL)
service_request = service.documents().analyzeSentiment(
body={
'document': {
'type': 'PLAIN_TEXT',
'content': 'món ăn này rất tệ.'
},
'encoding_type': 'UTF8'
})
response = service_request.execute()
Then, I show the response on console:
{u'documentSentiment': {u'magnitude': 0, u'score': 0}, u'language': u'vi', u'sentences': []}}
Could anyone tell me why Google was not score my phrase? Thanks.