Skip to content

Commit 7a7a83d

Browse files
authored
Prep language docs for repo split. (googleapis#5932)
- Move docs from 'docs/language' into 'language/docs' and leave symlink. - Harmonize / DRY 'language/README.rst' and 'language/docs/index.rst'. - Ensure that docs still build from top-level. Toward googleapis#5912.
1 parent 10e13cc commit 7a7a83d

13 files changed

Lines changed: 426 additions & 141 deletions

File tree

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
firestore/index
1818
iot/index
1919
kms/index
20-
language/usage
20+
language/index
2121
pubsub/index
2222
oslogin/index
2323
resource-manager/api

docs/language

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../language/docs/

docs/language/changelog.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

language/README.rst

Lines changed: 65 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
11
Python Client for Google Cloud Natural Language
22
===============================================
33

4-
Python idiomatic client for `Google Cloud Natural Language`_
5-
6-
.. _Google Cloud Natural Language: https://cloud.google.com/natural-language/
7-
84
|pypi| |versions|
95

10-
- `Documentation`_
6+
The `Google Cloud Natural Language`_ API can be used to reveal the
7+
structure and meaning of text via powerful machine
8+
learning models. You can use it to extract information about
9+
people, places, events and much more, mentioned in text documents,
10+
news articles or blog posts. You can use it to understand
11+
sentiment about your product on social media or parse intent from
12+
customer conversations happening in a call center or a messaging
13+
app. You can analyze text uploaded in your request or integrate
14+
with your document storage on Google Cloud Storage.
1115

12-
.. _Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/language/usage.html
16+
- `Client Library Documentation`_
17+
- `Product Documentation`_
18+
19+
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-language.svg
20+
:target: https://pypi.org/project/google-cloud-language/
21+
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-language.svg
22+
:target: https://pypi.org/project/google-cloud-language/
23+
.. _Google Cloud Natural Language: https://cloud.google.com/natural-language/
24+
.. _Product Documentation: https://cloud.google.com/language/docs
25+
.. _Client Library Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/language/index.html
1326

1427
.. note::
1528

@@ -19,44 +32,60 @@ Python Client for Google Cloud Natural Language
1932
Quick Start
2033
-----------
2134

22-
.. code-block:: console
35+
In order to use this library, you first need to go through the following steps:
2336

24-
$ pip install --upgrade google-cloud-language
25-
$ # OR
26-
$ pip install --upgrade google-cloud-natural-language
37+
1. `Select or create a Cloud Platform project.`_
38+
2. `Enable billing for your project.`_
39+
3. `Enable the Google Cloud Language API.`_
40+
4. `Setup Authentication.`_
2741

28-
For more information on setting up your Python development environment,
29-
such as installing ``pip`` and on your system, please refer to
30-
`Python Development Environment Setup Guide`_ for Google Cloud Platform.
42+
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
43+
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
44+
.. _Enable the Google Cloud Language API.: https://cloud.google.com/natural-language
45+
.. _Setup Authentication.: https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html
3146

32-
.. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup
47+
Installation
48+
~~~~~~~~~~~~
3349

34-
Authentication
35-
--------------
50+
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
51+
create isolated Python environments. The basic problem it addresses is one of
52+
dependencies and versions, and indirectly permissions.
3653

37-
With ``google-cloud-python`` we try to make authentication as painless as
38-
possible. Check out the `Authentication section`_ in our documentation to
39-
learn more. You may also find the `authentication document`_ shared by all
40-
the ``google-cloud-*`` libraries to be helpful.
54+
With `virtualenv`_, it's possible to install this library without needing system
55+
install permissions, and without clashing with the installed system
56+
dependencies.
4157

42-
.. _Authentication section: https://google-cloud-python.readthedocs.io/en/latest/core/auth.html
43-
.. _authentication document: https://github.com/GoogleCloudPlatform/google-cloud-common/tree/master/authentication
58+
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
4459

45-
Using the API
46-
-------------
4760

48-
The Google Cloud `Natural Language`_ API (`Natural Language API docs`_)
49-
provides natural language understanding technologies to developers,
50-
including sentiment analysis, entity recognition, and syntax analysis.
51-
This API is part of the larger Cloud Machine Learning API.
61+
Mac/Linux
62+
^^^^^^^^^
5263

53-
.. _Natural Language: https://cloud.google.com/natural-language/
54-
.. _Natural Language API docs: https://cloud.google.com/natural-language/reference/rest/
64+
.. code-block:: console
5565
56-
See the ``google-cloud-python`` API Natural Language `Documentation`_ to learn
57-
how to analyze text with this API.
66+
pip install virtualenv
67+
virtualenv <your-env>
68+
source <your-env>/bin/activate
69+
<your-env>/bin/pip install google-cloud-language
5870
59-
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-language.svg
60-
:target: https://pypi.org/project/google-cloud-language/
61-
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-language.svg
62-
:target: https://pypi.org/project/google-cloud-language/
71+
72+
Windows
73+
^^^^^^^
74+
75+
.. code-block:: console
76+
77+
pip install virtualenv
78+
virtualenv <your-env>
79+
<your-env>\Scripts\activate
80+
<your-env>\Scripts\pip.exe install google-cloud-language
81+
82+
83+
Next Steps
84+
~~~~~~~~~~
85+
86+
- Read the `Usage documentation`_ for the language client
87+
to see available methods on the client.
88+
- Read the `Product documentation`_ to learn
89+
more about the product and see How-to Guides.
90+
91+
.. _Usage documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/language/usage.html

language/docs/api.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Language Client API Reference
2+
=============================
3+
4+
This package includes clients for multiple versions of the Natural Language
5+
API. By default, you will get ``v1``, the latest GA version.
6+
7+
.. toctree::
8+
:maxdepth: 2
9+
10+
gapic/v1/api
11+
gapic/v1/types
12+
13+
If you are interested in beta features ahead of the latest GA, you may
14+
opt-in to the v1.1 beta, which is spelled ``v1beta2``. In order to do this,
15+
you will want to import from ``google.cloud.language_v1beta2`` in lieu of
16+
``google.cloud.language``.
17+
18+
An API and type reference is provided for the v1.1 beta also:
19+
20+
.. toctree::
21+
:maxdepth: 2
22+
23+
gapic/v1beta2/api
24+
gapic/v1beta2/types
25+
26+
.. note::
27+
28+
The client for the beta API is provided on a provisional basis. The API
29+
surface is subject to change, and it is possible that this client will be
30+
deprecated or removed after its features become GA.

language/docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

0 commit comments

Comments
 (0)