File tree 1 file changed +2
-12
lines changed
language/cloud-client/v1beta2
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):
175
175
content = text .encode ('utf-8' ),
176
176
type = enums .Document .Type .PLAIN_TEXT )
177
177
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 )
184
179
185
180
for entity in result .entities :
186
181
print ('Mentions: ' )
@@ -204,12 +199,7 @@ def entity_sentiment_file(gcs_uri):
204
199
gcs_content_uri = gcs_uri ,
205
200
type = enums .Document .Type .PLAIN_TEXT )
206
201
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 )
213
203
214
204
for entity in result .entities :
215
205
print (u'Name: "{}"' .format (entity .name ))
You can’t perform that action at this time.
0 commit comments