diff --git a/language/cloud-client/v1beta2/quickstart.py b/language/cloud-client/v1beta2/quickstart.py index 3cef5fca819d..b19d11b7bc17 100644 --- a/language/cloud-client/v1beta2/quickstart.py +++ b/language/cloud-client/v1beta2/quickstart.py @@ -18,16 +18,12 @@ def run_quickstart(): # [START language_quickstart] # Imports the Google Cloud client library - # [START beta_import_client] - # [START beta_import] from google.cloud import language_v1beta2 from google.cloud.language_v1beta2 import enums from google.cloud.language_v1beta2 import types - # [END beta_import] # Instantiates a client with the v1beta2 version client = language_v1beta2.LanguageServiceClient() - # [END beta_import_client] # The text to analyze text = u'Hallo Welt!' diff --git a/language/cloud-client/v1beta2/snippets.py b/language/cloud-client/v1beta2/snippets.py index af7836ba3c64..0ea7352aeb95 100644 --- a/language/cloud-client/v1beta2/snippets.py +++ b/language/cloud-client/v1beta2/snippets.py @@ -24,9 +24,11 @@ import argparse import sys +# [START beta_import] from google.cloud import language_v1beta2 from google.cloud.language_v1beta2 import enums from google.cloud.language_v1beta2 import types +# [END beta_import] import six @@ -166,7 +168,9 @@ def syntax_file(gcs_uri): # [START def_entity_sentiment_text] def entity_sentiment_text(text): """Detects entity sentiment in the provided text.""" + # [START beta_client] client = language_v1beta2.LanguageServiceClient() + # [END beta_client] if isinstance(text, six.binary_type): text = text.decode('utf-8')