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 is a Beta release of Google Cloud Natural Language.** This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.
780
+
781
+
-[API Documentation][gcloud-language-docs]
782
+
-[Official Documentation][cloud-language-docs]
783
+
784
+
#### Using the all-in-one module
785
+
786
+
```
787
+
$ npm install --save google-cloud
788
+
```
789
+
790
+
```js
791
+
var gcloud =require('google-cloud');
792
+
var language =gcloud.language;
793
+
```
794
+
795
+
#### Using the Natural Language API module
796
+
797
+
```
798
+
$ npm install --save @google-cloud/language
799
+
```
800
+
801
+
```js
802
+
var language =require('@google-cloud/language');
803
+
```
804
+
805
+
#### Preview
806
+
807
+
```js
808
+
// Authenticating on a per-API-basis. You don't need to do this if you auth on a
809
+
// global basis (see Authorization section above).
810
+
811
+
var languageClient =language({
812
+
projectId:'grape-spaceship-123',
813
+
keyFilename:'/path/to/keyfile.json'
814
+
});
815
+
816
+
// Get the entities from a sentence.
817
+
languageClient.detectEntities('Stephen of Michigan!', function(err, entities) {
818
+
// entities = {
819
+
// people: ['Stephen'],
820
+
// places: ['Michigan']
821
+
// }
822
+
});
823
+
824
+
// Create a document if you plan to run multiple detections.
// sentiment = 100 // Large numbers represent more positive sentiments.
830
+
});
831
+
832
+
// Parse the syntax of the document.
833
+
document.annotate(function(err, annotations) {
834
+
// annotations = {
835
+
// language: 'en',
836
+
// sentiment: 100,
837
+
// entities: {},
838
+
// sentences: ['Contributions welcome!'],
839
+
// tokens: [
840
+
// {
841
+
// text: 'Contributions',
842
+
// partOfSpeech: 'Noun (common and proper)',
843
+
// partOfSpeechTag: 'NOUN'
844
+
// },
845
+
// {
846
+
// text: 'welcome',
847
+
// partOfSpeech: 'Verb (all tenses and modes)',
848
+
// partOfSpeechTag: 'VERB'
849
+
// },
850
+
// {
851
+
// text: '!',
852
+
// partOfSpeech: 'Punctuation',
853
+
// partOfSpeechTag: 'PUNCT'
854
+
// }
855
+
// ]
856
+
// }
857
+
});
858
+
```
859
+
860
+
776
861
## Google Cloud Resource Manager (Beta)
777
862
778
863
> **This is a Beta release of Google Cloud Resource Manager.** This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.
@@ -804,8 +889,8 @@ var resource = require('@google-cloud/resource');
804
889
#### Preview
805
890
806
891
```js
807
-
//Authorizing on a per-API-basis. You don't need to do this if you auth on a
808
-
// global basis (see Authorization section above).
892
+
//Authenticating on a per-API-basis. You don't need to do this if you auth on a
893
+
// global basis (see Authentication section above).
809
894
810
895
var resourceClient =resource({
811
896
projectId:'grape-spaceship-123',
@@ -916,8 +1001,8 @@ var vision = require('@google-cloud/vision');
916
1001
#### Preview
917
1002
918
1003
```js
919
-
//Authorizing on a per-API-basis. You don't need to do this if you auth on a
920
-
// global basis (see Authorization section above).
1004
+
//Authenticating on a per-API-basis. You don't need to do this if you auth on a
1005
+
// global basis (see Authentication section above).
921
1006
922
1007
var visionClient =vision({
923
1008
projectId:'grape-spaceship-123',
@@ -1033,6 +1118,7 @@ Apache 2.0 - See [COPYING](COPYING) for more information.
0 commit comments