Skip to content

Commit d08184a

Browse files
michaelbausorjdpedrie
authored andcommitted
Language rename (googleapis#436)
* Add language v1beta2; update composer * Update to NaturalLanguage * Initial rename * Move files, update composer * Update service builder * Additional renaming * Doc and readme renames * Rename doc contents file * Update heading to Language * Update Language docs
1 parent 24a5fab commit d08184a

30 files changed

Lines changed: 680 additions & 99 deletions

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,17 +203,17 @@ $ require google/cloud-bigquery
203203

204204
## Google Cloud Natural Language (Beta)
205205

206-
- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/naturallanguage/naturallanguageclient)
206+
- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/language/languageclient)
207207
- [Official Documentation](https://cloud.google.com/natural-language/docs)
208208

209209
#### Preview
210210

211211
```php
212212
require 'vendor/autoload.php';
213213

214-
use Google\Cloud\NaturalLanguage\NaturalLanguageClient;
214+
use Google\Cloud\Language\LanguageClient;
215215

216-
$language = new NaturalLanguageClient([
216+
$language = new LanguageClient([
217217
'projectId' => 'my_project'
218218
]);
219219

@@ -240,12 +240,12 @@ foreach ($tokens as $token) {
240240
}
241241
```
242242

243-
#### google/cloud-natural-language
243+
#### google/cloud-language
244244

245-
Google Cloud Natural Language can be installed separately by requiring the `google/cloud-natural-language` composer package:
245+
Google Cloud Natural Language can be installed separately by requiring the `google/cloud-language` composer package:
246246

247247
```
248-
$ require google/cloud-natural-language
248+
$ require google/cloud-language
249249
```
250250

251251
## Google Cloud Translation (Beta)

‎composer.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"big query",
1616
"datastore",
1717
"stackdriver logging",
18+
"language",
1819
"natural language",
1920
"pubsub",
2021
"pub sub",
@@ -54,7 +55,7 @@
5455
"league/json-guard": "^0.3",
5556
"erusev/parsedown": "^1.6",
5657
"vierbergenlars/php-semver": "^3.0",
57-
"google/proto-client-php": "^0.10",
58+
"google/proto-client-php": "^0.11",
5859
"google/gax": "^0.8"
5960
},
6061
"suggest": {

‎docs/contents/cloud-language.json‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"title": "Language",
3+
"pattern": "language\/\\w{1,}",
4+
"services": [{
5+
"title": "LanguageClient",
6+
"type": "language/languageclient"
7+
}, {
8+
"title": "Annotation",
9+
"type": "language/annotation"
10+
}, {
11+
"title": "v1beta2",
12+
"type": "language/v1beta2/readme",
13+
"patterns": [
14+
"language/v1beta2/\\w{1,}"
15+
],
16+
"nav": [{
17+
"title": "LanguageServiceClient",
18+
"type": "language/v1beta2/languageserviceclient"
19+
}]
20+
}]
21+
}

‎docs/contents/cloud-natural-language.json‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎docs/contents/google-cloud.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"cloud-error-reporting",
1111
"cloud-logging",
1212
"cloud-monitoring",
13-
"cloud-natural-language",
13+
"cloud-language",
1414
"cloud-pubsub",
1515
"cloud-speech",
1616
"cloud-storage",

‎docs/external-classes.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
}, {
1414
"name": "google\\cloud\\language\\v1\\",
1515
"uri": "https://github.com/googleapis/proto-client-php/tree/master/src/language/v1"
16+
}, {
17+
"name": "google\\cloud\\language\\v1beta2\\",
18+
"uri": "https://github.com/googleapis/proto-client-php/tree/master/src/language/v1beta2"
1619
}, {
1720
"name": "google\\logging\\v2\\",
1821
"uri": "https://github.com/googleapis/proto-client-php/tree/master/src/logging/v2"

‎docs/manifest.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@
103103
]
104104
},
105105
{
106-
"id": "cloud-natural-language",
107-
"name": "google/cloud-natural-language",
108-
"defaultService": "naturallanguage/naturallanguageclient",
106+
"id": "cloud-language",
107+
"name": "google/cloud-language",
108+
"defaultService": "language/languageclient",
109109
"versions": [
110110
"v0.2.0",
111111
"v0.1.0",
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
namespace Google\Cloud\NaturalLanguage;
18+
namespace Google\Cloud\Language;
1919

2020
use Google\Cloud\Core\CallTrait;
2121

@@ -24,21 +24,21 @@
2424
* [Google Cloud Natural Language API](https://cloud.google.com/natural-language/docs).
2525
*
2626
* This class is created internally by
27-
* {@see Google\Cloud\NaturalLanguage\NaturalLanguageClient} and is used to
27+
* {@see Google\Cloud\Language\LanguageClient} and is used to
2828
* represent various document analyzation results. It should not be instantiated
2929
* externally.
3030
*
3131
* Annotations are returned by
32-
* {@see Google\Cloud\NaturalLanguage\NaturalLanguageClient::analyzeEntities()},
33-
* {@see Google\Cloud\NaturalLanguage\NaturalLanguageClient::analyzeSentiment()},
34-
* {@see Google\Cloud\NaturalLanguage\NaturalLanguageClient::analyzeSyntax()} and
35-
* {@see Google\Cloud\NaturalLanguage\NaturalLanguageClient::annotateText()}.
32+
* {@see Google\Cloud\Language\LanguageClient::analyzeEntities()},
33+
* {@see Google\Cloud\Language\LanguageClient::analyzeSentiment()},
34+
* {@see Google\Cloud\Language\LanguageClient::analyzeSyntax()} and
35+
* {@see Google\Cloud\Language\LanguageClient::annotateText()}.
3636
*
3737
* Example:
3838
* ```
39-
* use Google\Cloud\NaturalLanguage\NaturalLanguageClient;
39+
* use Google\Cloud\Language\LanguageClient;
4040
*
41-
* $language = new NaturalLanguageClient();
41+
* $language = new LanguageClient();
4242
*
4343
* $annotation = $language->annotateText('Google Cloud Platform is a powerful tool.');
4444
* ```

src/NaturalLanguage/Connection/ConnectionInterface.php renamed to src/Language/Connection/ConnectionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
namespace Google\Cloud\NaturalLanguage\Connection;
18+
namespace Google\Cloud\Language\Connection;
1919

2020
/**
2121
* Represents a connection to
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
* limitations under the License.
1616
*/
1717

18-
namespace Google\Cloud\NaturalLanguage\Connection;
18+
namespace Google\Cloud\Language\Connection;
1919

2020
use Google\Cloud\Core\RequestBuilder;
2121
use Google\Cloud\Core\RequestWrapper;
2222
use Google\Cloud\Core\RestTrait;
2323
use Google\Cloud\Core\UriTrait;
24-
use Google\Cloud\NaturalLanguage\NaturalLanguageClient;
24+
use Google\Cloud\Language\LanguageClient;
2525

2626
/**
2727
* Implementation of the
@@ -41,7 +41,7 @@ public function __construct(array $config = [])
4141
{
4242
$config += [
4343
'serviceDefinitionPath' => __DIR__ . '/ServiceDefinition/language-v1.json',
44-
'componentVersion' => NaturalLanguageClient::VERSION
44+
'componentVersion' => LanguageClient::VERSION
4545
];
4646

4747
$this->setRequestWrapper(new RequestWrapper($config));

0 commit comments

Comments
 (0)