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