File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
language/cloud-client/v1beta2 Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -175,12 +175,7 @@ def entity_sentiment_text(text):
175175 content = text .encode ('utf-8' ),
176176 type = enums .Document .Type .PLAIN_TEXT )
177177
178- encoding = enums .EncodingType .UTF32
179- if sys .maxunicode == 65535 :
180- encoding = enums .EncodingType .UTF16
181-
182- result = client .analyze_entity_sentiment (
183- document , encoding )
178+ result = client .analyze_entity_sentiment (document )
184179
185180 for entity in result .entities :
186181 print ('Mentions: ' )
@@ -204,12 +199,7 @@ def entity_sentiment_file(gcs_uri):
204199 gcs_content_uri = gcs_uri ,
205200 type = enums .Document .Type .PLAIN_TEXT )
206201
207- encoding = enums .EncodingType .UTF32
208- if sys .maxunicode == 65535 :
209- encoding = enums .EncodingType .UTF16
210-
211- result = client .analyze_entity_sentiment (
212- document , encoding )
202+ result = client .analyze_entity_sentiment (document )
213203
214204 for entity in result .entities :
215205 print (u'Name: "{}"' .format (entity .name ))
You can’t perform that action at this time.
0 commit comments