.. This file is automatically generated. Do not edit this file directly. Google Cloud Natural Language Tutorial Python Samples =============================================================================== .. image:: https://gstatic.com/cloudssh/images/open-btn.png :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/tutorial/README.rst This directory contains samples for Google Cloud Natural Language Tutorial. 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. .. _Google Cloud Natural Language Tutorial: https://cloud.google.com/natural-language/docs/ Setup ------------------------------------------------------------------------------- Authentication ++++++++++++++ This sample requires you to have authentication setup. Refer to the `Authentication Getting Started Guide`_ for instructions on setting up credentials for applications. .. _Authentication Getting Started Guide: https://cloud.google.com/docs/authentication/getting-started Install Dependencies ++++++++++++++++++++ #. 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. .. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup #. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. .. code-block:: bash $ virtualenv env $ source env/bin/activate #. Install the dependencies needed to run the samples. .. code-block:: bash $ pip install -r requirements.txt .. _pip: https://pip.pypa.io/ .. _virtualenv: https://virtualenv.pypa.io/ Samples ------------------------------------------------------------------------------- Language tutorial +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. image:: https://gstatic.com/cloudssh/images/open-btn.png :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/tutorial/tutorial.py;language/tutorial/README.rst To run this sample: .. code-block:: bash $ python tutorial.py usage: tutorial.py [-h] movie_review_filename positional arguments: movie_review_filename The filename of the movie review you'd like to analyze. optional arguments: -h, --help show this help message and exit .. _Google Cloud SDK: https://cloud.google.com/sdk/