File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
language/cloud-client/v1beta2 Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1818def run_quickstart ():
1919 # [START language_quickstart]
2020 # Imports the Google Cloud client library
21- # [START beta_import_client]
22- # [START beta_import]
2321 from google .cloud import language_v1beta2
2422 from google .cloud .language_v1beta2 import enums
2523 from google .cloud .language_v1beta2 import types
26- # [END beta_import]
2724
2825 # Instantiates a client with the v1beta2 version
2926 client = language_v1beta2 .LanguageServiceClient ()
30- # [END beta_import_client]
3127
3228 # The text to analyze
3329 text = u'Hallo Welt!'
Original file line number Diff line number Diff line change 2424import argparse
2525import sys
2626
27+ # [START beta_import]
2728from google .cloud import language_v1beta2
2829from google .cloud .language_v1beta2 import enums
2930from google .cloud .language_v1beta2 import types
31+ # [END beta_import]
3032import six
3133
3234
@@ -166,7 +168,9 @@ def syntax_file(gcs_uri):
166168# [START def_entity_sentiment_text]
167169def entity_sentiment_text (text ):
168170 """Detects entity sentiment in the provided text."""
171+ # [START beta_client]
169172 client = language_v1beta2 .LanguageServiceClient ()
173+ # [END beta_client]
170174
171175 if isinstance (text , six .binary_type ):
172176 text = text .decode ('utf-8' )
You can’t perform that action at this time.
0 commit comments