You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains samples for Google Cloud Natural Language API. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API.
This directory contains samples for Google Cloud Natural Language API. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers.
7
11
8
12
This tutorial demostrates how to use the `classify_text` method to classify content category of text files, and use the result to compare texts by their similarity to each other. See the `tutorial page`_ for details about this sample.
@@ -21,39 +25,20 @@ Setup
21
25
Authentication
22
26
++++++++++++++
23
27
24
-
Authentication is typically done through `Application Default Credentials`_,
25
-
which means you do not have to change the code to authenticate as long as
26
-
your environment has credentials. You have a few options for setting up
27
-
authentication:
28
-
29
-
#. When running locally, use the `Google Cloud SDK`_
30
-
31
-
.. code-block:: bash
32
-
33
-
gcloud auth application-default login
34
-
35
-
36
-
#. When running on App Engine or Compute Engine, credentials are already
37
-
set-up. However, you may need to configure your Compute Engine instance
38
-
with `additional scopes`_.
39
-
40
-
#. You can create a `Service Account key file`_. This file can be used to
41
-
authenticate to Google Cloud Platform services from any environment. To use
42
-
the file, set the ``GOOGLE_APPLICATION_CREDENTIALS`` environment variable to
#. Install `pip`_ and `virtualenv`_ if you do not already have them.
38
+
#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions.
39
+
40
+
.. _Python Development Environment Setup Guide:
41
+
https://cloud.google.com/python/setup
57
42
58
43
#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
This directory contains samples for Google Cloud Natural Language API. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API.
7
11
8
12
- See the `migration guide`_ for information about migrating to Python client library v0.26.1.
This directory contains samples for Google Cloud Natural Language API. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API.
7
11
8
12
- See the `migration guide`_ for information about migrating to Python client library v0.26.1.
0 commit comments