Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93c3656 commit 56e1b34Copy full SHA for 56e1b34
language/cloud-client/v1/snippets.py
@@ -27,7 +27,6 @@
27
28
def sentiment_text():
29
# [START language_sentiment_text]
30
- import six
31
from google.cloud import language
32
from google.cloud.language import enums
33
from google.cloud.language import types
@@ -36,8 +35,10 @@ def sentiment_text():
36
35
37
client = language.LanguageServiceClient()
38
39
- if isinstance(text, six.binary_type):
+ try:
40
text = text.decode('utf-8')
+ except AttributeError:
41
+ pass
42
43
# Instantiates a plain text document.
44
# [START language_python_migration_sentiment_text]
0 commit comments