OLD | NEW |
1 { | 1 { |
2 "auth": { | 2 "auth": { |
3 "oauth2": { | 3 "oauth2": { |
4 "scopes": { | 4 "scopes": { |
5 "https://www.googleapis.com/auth/cloud-language": { | 5 "https://www.googleapis.com/auth/cloud-language": { |
6 "description": "Apply machine learning models to reveal the
structure and meaning of text" | 6 "description": "Apply machine learning models to reveal the
structure and meaning of text" |
7 }, | 7 }, |
8 "https://www.googleapis.com/auth/cloud-platform": { | 8 "https://www.googleapis.com/auth/cloud-platform": { |
9 "description": "View and manage your data across Google Clou
d Platform services" | 9 "description": "View and manage your data across Google Clou
d Platform services" |
10 } | 10 } |
(...skipping 10 matching lines...) Expand all Loading... |
21 "icons": { | 21 "icons": { |
22 "x16": "http://www.google.com/images/icons/product/search-16.gif", | 22 "x16": "http://www.google.com/images/icons/product/search-16.gif", |
23 "x32": "http://www.google.com/images/icons/product/search-32.gif" | 23 "x32": "http://www.google.com/images/icons/product/search-32.gif" |
24 }, | 24 }, |
25 "id": "language:v1", | 25 "id": "language:v1", |
26 "kind": "discovery#restDescription", | 26 "kind": "discovery#restDescription", |
27 "name": "language", | 27 "name": "language", |
28 "ownerDomain": "google.com", | 28 "ownerDomain": "google.com", |
29 "ownerName": "Google", | 29 "ownerName": "Google", |
30 "parameters": { | 30 "parameters": { |
31 "key": { | |
32 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", | |
33 "location": "query", | |
34 "type": "string" | |
35 }, | |
36 "access_token": { | |
37 "description": "OAuth access token.", | |
38 "location": "query", | |
39 "type": "string" | |
40 }, | |
41 "quotaUser": { | |
42 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters.", | |
43 "location": "query", | |
44 "type": "string" | |
45 }, | |
46 "pp": { | |
47 "default": "true", | |
48 "description": "Pretty-print response.", | |
49 "location": "query", | |
50 "type": "boolean" | |
51 }, | |
52 "bearer_token": { | |
53 "description": "OAuth bearer token.", | |
54 "location": "query", | |
55 "type": "string" | |
56 }, | |
57 "oauth_token": { | |
58 "description": "OAuth 2.0 token for the current user.", | |
59 "location": "query", | |
60 "type": "string" | |
61 }, | |
62 "upload_protocol": { | 31 "upload_protocol": { |
63 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", | 32 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", |
64 "location": "query", | 33 "location": "query", |
65 "type": "string" | 34 "type": "string" |
66 }, | 35 }, |
67 "prettyPrint": { | 36 "prettyPrint": { |
68 "default": "true", | 37 "default": "true", |
69 "description": "Returns response with indentations and line breaks."
, | 38 "description": "Returns response with indentations and line breaks."
, |
70 "location": "query", | 39 "location": "query", |
71 "type": "boolean" | 40 "type": "boolean" |
72 }, | 41 }, |
73 "fields": { | 42 "fields": { |
74 "description": "Selector specifying which fields to include in a par
tial response.", | 43 "description": "Selector specifying which fields to include in a par
tial response.", |
75 "location": "query", | 44 "location": "query", |
76 "type": "string" | 45 "type": "string" |
77 }, | 46 }, |
78 "uploadType": { | 47 "uploadType": { |
79 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", | 48 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", |
80 "location": "query", | 49 "location": "query", |
81 "type": "string" | 50 "type": "string" |
82 }, | 51 }, |
| 52 "callback": { |
| 53 "description": "JSONP", |
| 54 "location": "query", |
| 55 "type": "string" |
| 56 }, |
83 "$.xgafv": { | 57 "$.xgafv": { |
84 "description": "V1 error format.", | 58 "description": "V1 error format.", |
85 "enum": [ | 59 "enum": [ |
86 "1", | 60 "1", |
87 "2" | 61 "2" |
88 ], | 62 ], |
89 "enumDescriptions": [ | 63 "enumDescriptions": [ |
90 "v1 error format", | 64 "v1 error format", |
91 "v2 error format" | 65 "v2 error format" |
92 ], | 66 ], |
93 "location": "query", | 67 "location": "query", |
94 "type": "string" | 68 "type": "string" |
95 }, | 69 }, |
96 "callback": { | |
97 "description": "JSONP", | |
98 "location": "query", | |
99 "type": "string" | |
100 }, | |
101 "alt": { | 70 "alt": { |
102 "default": "json", | 71 "default": "json", |
103 "description": "Data format for response.", | 72 "description": "Data format for response.", |
104 "enum": [ | 73 "enum": [ |
105 "json", | 74 "json", |
106 "media", | 75 "media", |
107 "proto" | 76 "proto" |
108 ], | 77 ], |
109 "enumDescriptions": [ | 78 "enumDescriptions": [ |
110 "Responses with Content-Type of application/json", | 79 "Responses with Content-Type of application/json", |
111 "Media download with context-dependent Content-Type", | 80 "Media download with context-dependent Content-Type", |
112 "Responses with Content-Type of application/x-protobuf" | 81 "Responses with Content-Type of application/x-protobuf" |
113 ], | 82 ], |
114 "location": "query", | 83 "location": "query", |
115 "type": "string" | 84 "type": "string" |
| 85 }, |
| 86 "key": { |
| 87 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", |
| 88 "location": "query", |
| 89 "type": "string" |
| 90 }, |
| 91 "access_token": { |
| 92 "description": "OAuth access token.", |
| 93 "location": "query", |
| 94 "type": "string" |
| 95 }, |
| 96 "quotaUser": { |
| 97 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters.", |
| 98 "location": "query", |
| 99 "type": "string" |
| 100 }, |
| 101 "pp": { |
| 102 "default": "true", |
| 103 "description": "Pretty-print response.", |
| 104 "location": "query", |
| 105 "type": "boolean" |
| 106 }, |
| 107 "oauth_token": { |
| 108 "description": "OAuth 2.0 token for the current user.", |
| 109 "location": "query", |
| 110 "type": "string" |
| 111 }, |
| 112 "bearer_token": { |
| 113 "description": "OAuth bearer token.", |
| 114 "location": "query", |
| 115 "type": "string" |
116 } | 116 } |
117 }, | 117 }, |
118 "protocol": "rest", | 118 "protocol": "rest", |
119 "resources": { | 119 "resources": { |
120 "documents": { | 120 "documents": { |
121 "methods": { | 121 "methods": { |
122 "analyzeEntities": { | 122 "analyzeEntities": { |
123 "description": "Finds named entities (currently proper names
and common nouns) in the text\nalong with entity types, salience, mentions for
each entity, and\nother properties.", | 123 "description": "Finds named entities (currently proper names
and common nouns) in the text\nalong with entity types, salience, mentions for
each entity, and\nother properties.", |
124 "httpMethod": "POST", | 124 "httpMethod": "POST", |
125 "id": "language.documents.analyzeEntities", | 125 "id": "language.documents.analyzeEntities", |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 "$ref": "AnnotateTextResponse" | 187 "$ref": "AnnotateTextResponse" |
188 }, | 188 }, |
189 "scopes": [ | 189 "scopes": [ |
190 "https://www.googleapis.com/auth/cloud-language", | 190 "https://www.googleapis.com/auth/cloud-language", |
191 "https://www.googleapis.com/auth/cloud-platform" | 191 "https://www.googleapis.com/auth/cloud-platform" |
192 ] | 192 ] |
193 } | 193 } |
194 } | 194 } |
195 } | 195 } |
196 }, | 196 }, |
197 "revision": "20170726", | 197 "revision": "20170809", |
198 "rootUrl": "https://language.googleapis.com/", | 198 "rootUrl": "https://language.googleapis.com/", |
199 "schemas": { | 199 "schemas": { |
200 "Features": { | |
201 "description": "All available features for sentiment, syntax, and se
mantic analysis.\nSetting each one to true will enable that specific analysis fo
r the input.", | |
202 "id": "Features", | |
203 "properties": { | |
204 "extractDocumentSentiment": { | |
205 "description": "Extract document-level sentiment.", | |
206 "type": "boolean" | |
207 }, | |
208 "extractSyntax": { | |
209 "description": "Extract syntax information.", | |
210 "type": "boolean" | |
211 }, | |
212 "extractEntities": { | |
213 "description": "Extract entities.", | |
214 "type": "boolean" | |
215 } | |
216 }, | |
217 "type": "object" | |
218 }, | |
219 "EntityMention": { | |
220 "description": "Represents a mention for an entity in the text. Curr
ently, proper noun\nmentions are supported.", | |
221 "id": "EntityMention", | |
222 "properties": { | |
223 "type": { | |
224 "description": "The type of the entity mention.", | |
225 "enum": [ | |
226 "TYPE_UNKNOWN", | |
227 "PROPER", | |
228 "COMMON" | |
229 ], | |
230 "enumDescriptions": [ | |
231 "Unknown", | |
232 "Proper name", | |
233 "Common noun (or noun compound)" | |
234 ], | |
235 "type": "string" | |
236 }, | |
237 "text": { | |
238 "$ref": "TextSpan", | |
239 "description": "The mention text." | |
240 } | |
241 }, | |
242 "type": "object" | |
243 }, | |
244 "Sentence": { | |
245 "description": "Represents a sentence in the input document.", | |
246 "id": "Sentence", | |
247 "properties": { | |
248 "text": { | |
249 "$ref": "TextSpan", | |
250 "description": "The sentence text." | |
251 }, | |
252 "sentiment": { | |
253 "$ref": "Sentiment", | |
254 "description": "For calls to AnalyzeSentiment or if\nAnnotat
eTextRequest.Features.extract_document_sentiment is set to\ntrue, this field wil
l contain the sentiment for the sentence." | |
255 } | |
256 }, | |
257 "type": "object" | |
258 }, | |
259 "Document": { | |
260 "description": "####################################################
############ #\n\nRepresents the input to API methods.", | |
261 "id": "Document", | |
262 "properties": { | |
263 "content": { | |
264 "description": "The content of the input in string format.", | |
265 "type": "string" | |
266 }, | |
267 "type": { | |
268 "description": "Required. If the type is not set or is `TYPE
_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", | |
269 "enum": [ | |
270 "TYPE_UNSPECIFIED", | |
271 "PLAIN_TEXT", | |
272 "HTML" | |
273 ], | |
274 "enumDescriptions": [ | |
275 "The content type is not specified.", | |
276 "Plain text", | |
277 "HTML" | |
278 ], | |
279 "type": "string" | |
280 }, | |
281 "gcsContentUri": { | |
282 "description": "The Google Cloud Storage URI where the file
content is located.\nThis URI must be of the form: gs://bucket_name/object_name.
For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nN
OTE: Cloud Storage object versioning is not supported.", | |
283 "type": "string" | |
284 }, | |
285 "language": { | |
286 "description": "The language of the document (if not specifi
ed, the language is\nautomatically detected). Both ISO and BCP-47 language codes
are\naccepted.<br>\n[Language Support](/natural-language/docs/languages)\nlists
currently supported languages for each API method.\nIf the language (either spe
cified by the caller or automatically detected)\nis not supported by the called
API method, an `INVALID_ARGUMENT` error\nis returned.", | |
287 "type": "string" | |
288 } | |
289 }, | |
290 "type": "object" | |
291 }, | |
292 "Sentiment": { | 200 "Sentiment": { |
293 "description": "Represents the feeling associated with the entire te
xt or entities in\nthe text.", | 201 "description": "Represents the feeling associated with the entire te
xt or entities in\nthe text.", |
294 "id": "Sentiment", | 202 "id": "Sentiment", |
295 "properties": { | 203 "properties": { |
296 "score": { | 204 "score": { |
297 "description": "Sentiment score between -1.0 (negative senti
ment) and 1.0\n(positive sentiment).", | 205 "description": "Sentiment score between -1.0 (negative senti
ment) and 1.0\n(positive sentiment).", |
298 "format": "float", | 206 "format": "float", |
299 "type": "number" | 207 "type": "number" |
300 }, | 208 }, |
301 "magnitude": { | 209 "magnitude": { |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 ], | 505 ], |
598 "type": "string" | 506 "type": "string" |
599 } | 507 } |
600 }, | 508 }, |
601 "type": "object" | 509 "type": "object" |
602 }, | 510 }, |
603 "AnalyzeSyntaxRequest": { | 511 "AnalyzeSyntaxRequest": { |
604 "description": "The syntax analysis request message.", | 512 "description": "The syntax analysis request message.", |
605 "id": "AnalyzeSyntaxRequest", | 513 "id": "AnalyzeSyntaxRequest", |
606 "properties": { | 514 "properties": { |
607 "document": { | |
608 "$ref": "Document", | |
609 "description": "Input document." | |
610 }, | |
611 "encodingType": { | 515 "encodingType": { |
612 "description": "The encoding type used by the API to calcula
te offsets.", | 516 "description": "The encoding type used by the API to calcula
te offsets.", |
613 "enum": [ | 517 "enum": [ |
614 "NONE", | 518 "NONE", |
615 "UTF8", | 519 "UTF8", |
616 "UTF16", | 520 "UTF16", |
617 "UTF32" | 521 "UTF32" |
618 ], | 522 ], |
619 "enumDescriptions": [ | 523 "enumDescriptions": [ |
620 "If `EncodingType` is not specified, encoding-dependent
information (such as\n`begin_offset`) will be set at `-1`.", | 524 "If `EncodingType` is not specified, encoding-dependent
information (such as\n`begin_offset`) will be set at `-1`.", |
621 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-8 encoding of the input. C++ and Go are example
s of languages\nthat use this encoding natively.", | 525 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-8 encoding of the input. C++ and Go are example
s of languages\nthat use this encoding natively.", |
622 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-16 encoding of the input. Java and Javascript a
re examples of\nlanguages that use this encoding natively.", | 526 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-16 encoding of the input. Java and Javascript a
re examples of\nlanguages that use this encoding natively.", |
623 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-32 encoding of the input. Python is an example
of a language\nthat uses this encoding natively." | 527 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-32 encoding of the input. Python is an example
of a language\nthat uses this encoding natively." |
624 ], | 528 ], |
625 "type": "string" | 529 "type": "string" |
| 530 }, |
| 531 "document": { |
| 532 "$ref": "Document", |
| 533 "description": "Input document." |
626 } | 534 } |
627 }, | 535 }, |
628 "type": "object" | 536 "type": "object" |
629 }, | 537 }, |
630 "AnalyzeSentimentResponse": { | 538 "AnalyzeSentimentResponse": { |
631 "description": "The sentiment analysis response message.", | 539 "description": "The sentiment analysis response message.", |
632 "id": "AnalyzeSentimentResponse", | 540 "id": "AnalyzeSentimentResponse", |
633 "properties": { | 541 "properties": { |
634 "documentSentiment": { | 542 "documentSentiment": { |
635 "$ref": "Sentiment", | 543 "$ref": "Sentiment", |
(...skipping 24 matching lines...) Expand all Loading... |
660 "entities": { | 568 "entities": { |
661 "description": "The recognized entities in the input documen
t.", | 569 "description": "The recognized entities in the input documen
t.", |
662 "items": { | 570 "items": { |
663 "$ref": "Entity" | 571 "$ref": "Entity" |
664 }, | 572 }, |
665 "type": "array" | 573 "type": "array" |
666 } | 574 } |
667 }, | 575 }, |
668 "type": "object" | 576 "type": "object" |
669 }, | 577 }, |
| 578 "AnalyzeSyntaxResponse": { |
| 579 "description": "The syntax analysis response message.", |
| 580 "id": "AnalyzeSyntaxResponse", |
| 581 "properties": { |
| 582 "language": { |
| 583 "description": "The language of the text, which will be the
same as the language specified\nin the request or, if not specified, the automat
ically-detected language.\nSee Document.language field for more details.", |
| 584 "type": "string" |
| 585 }, |
| 586 "sentences": { |
| 587 "description": "Sentences in the input document.", |
| 588 "items": { |
| 589 "$ref": "Sentence" |
| 590 }, |
| 591 "type": "array" |
| 592 }, |
| 593 "tokens": { |
| 594 "description": "Tokens, along with their syntactic informati
on, in the input document.", |
| 595 "items": { |
| 596 "$ref": "Token" |
| 597 }, |
| 598 "type": "array" |
| 599 } |
| 600 }, |
| 601 "type": "object" |
| 602 }, |
670 "Entity": { | 603 "Entity": { |
671 "description": "Represents a phrase in the text that is a known enti
ty, such as\na person, an organization, or location. The API associates informat
ion, such\nas salience and mentions, with entities.", | 604 "description": "Represents a phrase in the text that is a known enti
ty, such as\na person, an organization, or location. The API associates informat
ion, such\nas salience and mentions, with entities.", |
672 "id": "Entity", | 605 "id": "Entity", |
673 "properties": { | 606 "properties": { |
| 607 "mentions": { |
| 608 "description": "The mentions of this entity in the input doc
ument. The API currently\nsupports proper noun mentions.", |
| 609 "items": { |
| 610 "$ref": "EntityMention" |
| 611 }, |
| 612 "type": "array" |
| 613 }, |
| 614 "name": { |
| 615 "description": "The representative name for the entity.", |
| 616 "type": "string" |
| 617 }, |
674 "salience": { | 618 "salience": { |
675 "description": "The salience score associated with the entit
y in the [0, 1.0] range.\n\nThe salience score for an entity provides informatio
n about the\nimportance or centrality of that entity to the entire document text
.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\ns
alient.", | 619 "description": "The salience score associated with the entit
y in the [0, 1.0] range.\n\nThe salience score for an entity provides informatio
n about the\nimportance or centrality of that entity to the entire document text
.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\ns
alient.", |
676 "format": "float", | 620 "format": "float", |
677 "type": "number" | 621 "type": "number" |
678 }, | 622 }, |
679 "metadata": { | 623 "metadata": { |
680 "additionalProperties": { | 624 "additionalProperties": { |
681 "type": "string" | 625 "type": "string" |
682 }, | 626 }, |
683 "description": "Metadata associated with the entity.\n\nCurr
ently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The
associated keys are \"wikipedia_url\" and \"mid\", respectively.", | 627 "description": "Metadata associated with the entity.\n\nCurr
ently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The
associated keys are \"wikipedia_url\" and \"mid\", respectively.", |
(...skipping 15 matching lines...) Expand all Loading... |
699 "Unknown", | 643 "Unknown", |
700 "Person", | 644 "Person", |
701 "Location", | 645 "Location", |
702 "Organization", | 646 "Organization", |
703 "Event", | 647 "Event", |
704 "Work of art", | 648 "Work of art", |
705 "Consumer goods", | 649 "Consumer goods", |
706 "Other types" | 650 "Other types" |
707 ], | 651 ], |
708 "type": "string" | 652 "type": "string" |
709 }, | |
710 "mentions": { | |
711 "description": "The mentions of this entity in the input doc
ument. The API currently\nsupports proper noun mentions.", | |
712 "items": { | |
713 "$ref": "EntityMention" | |
714 }, | |
715 "type": "array" | |
716 }, | |
717 "name": { | |
718 "description": "The representative name for the entity.", | |
719 "type": "string" | |
720 } | 653 } |
721 }, | 654 }, |
722 "type": "object" | 655 "type": "object" |
723 }, | |
724 "AnalyzeSyntaxResponse": { | |
725 "description": "The syntax analysis response message.", | |
726 "id": "AnalyzeSyntaxResponse", | |
727 "properties": { | |
728 "language": { | |
729 "description": "The language of the text, which will be the
same as the language specified\nin the request or, if not specified, the automat
ically-detected language.\nSee Document.language field for more details.", | |
730 "type": "string" | |
731 }, | |
732 "sentences": { | |
733 "description": "Sentences in the input document.", | |
734 "items": { | |
735 "$ref": "Sentence" | |
736 }, | |
737 "type": "array" | |
738 }, | |
739 "tokens": { | |
740 "description": "Tokens, along with their syntactic informati
on, in the input document.", | |
741 "items": { | |
742 "$ref": "Token" | |
743 }, | |
744 "type": "array" | |
745 } | |
746 }, | |
747 "type": "object" | |
748 }, | 656 }, |
749 "AnnotateTextRequest": { | 657 "AnnotateTextRequest": { |
750 "description": "The request message for the text annotation API, whi
ch can perform multiple\nanalysis types (sentiment, entities, and syntax) in one
call.", | 658 "description": "The request message for the text annotation API, whi
ch can perform multiple\nanalysis types (sentiment, entities, and syntax) in one
call.", |
751 "id": "AnnotateTextRequest", | 659 "id": "AnnotateTextRequest", |
752 "properties": { | 660 "properties": { |
753 "encodingType": { | 661 "encodingType": { |
754 "description": "The encoding type used by the API to calcula
te offsets.", | 662 "description": "The encoding type used by the API to calcula
te offsets.", |
755 "enum": [ | 663 "enum": [ |
756 "NONE", | 664 "NONE", |
757 "UTF8", | 665 "UTF8", |
(...skipping 12 matching lines...) Expand all Loading... |
770 "$ref": "Document", | 678 "$ref": "Document", |
771 "description": "Input document." | 679 "description": "Input document." |
772 }, | 680 }, |
773 "features": { | 681 "features": { |
774 "$ref": "Features", | 682 "$ref": "Features", |
775 "description": "The enabled features." | 683 "description": "The enabled features." |
776 } | 684 } |
777 }, | 685 }, |
778 "type": "object" | 686 "type": "object" |
779 }, | 687 }, |
| 688 "AnalyzeSentimentRequest": { |
| 689 "description": "The sentiment analysis request message.", |
| 690 "id": "AnalyzeSentimentRequest", |
| 691 "properties": { |
| 692 "encodingType": { |
| 693 "description": "The encoding type used by the API to calcula
te sentence offsets.", |
| 694 "enum": [ |
| 695 "NONE", |
| 696 "UTF8", |
| 697 "UTF16", |
| 698 "UTF32" |
| 699 ], |
| 700 "enumDescriptions": [ |
| 701 "If `EncodingType` is not specified, encoding-dependent
information (such as\n`begin_offset`) will be set at `-1`.", |
| 702 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-8 encoding of the input. C++ and Go are example
s of languages\nthat use this encoding natively.", |
| 703 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-16 encoding of the input. Java and Javascript a
re examples of\nlanguages that use this encoding natively.", |
| 704 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-32 encoding of the input. Python is an example
of a language\nthat uses this encoding natively." |
| 705 ], |
| 706 "type": "string" |
| 707 }, |
| 708 "document": { |
| 709 "$ref": "Document", |
| 710 "description": "Input document." |
| 711 } |
| 712 }, |
| 713 "type": "object" |
| 714 }, |
780 "AnnotateTextResponse": { | 715 "AnnotateTextResponse": { |
781 "description": "The text annotations response message.", | 716 "description": "The text annotations response message.", |
782 "id": "AnnotateTextResponse", | 717 "id": "AnnotateTextResponse", |
783 "properties": { | 718 "properties": { |
| 719 "documentSentiment": { |
| 720 "$ref": "Sentiment", |
| 721 "description": "The overall sentiment for the document. Popu
lated if the user enables\nAnnotateTextRequest.Features.extract_document_sentime
nt." |
| 722 }, |
784 "language": { | 723 "language": { |
785 "description": "The language of the text, which will be the
same as the language specified\nin the request or, if not specified, the automat
ically-detected language.\nSee Document.language field for more details.", | 724 "description": "The language of the text, which will be the
same as the language specified\nin the request or, if not specified, the automat
ically-detected language.\nSee Document.language field for more details.", |
786 "type": "string" | 725 "type": "string" |
787 }, | 726 }, |
788 "sentences": { | 727 "sentences": { |
789 "description": "Sentences in the input document. Populated i
f the user enables\nAnnotateTextRequest.Features.extract_syntax.", | 728 "description": "Sentences in the input document. Populated i
f the user enables\nAnnotateTextRequest.Features.extract_syntax.", |
790 "items": { | 729 "items": { |
791 "$ref": "Sentence" | 730 "$ref": "Sentence" |
792 }, | 731 }, |
793 "type": "array" | 732 "type": "array" |
794 }, | 733 }, |
795 "tokens": { | 734 "tokens": { |
796 "description": "Tokens, along with their syntactic informati
on, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.F
eatures.extract_syntax.", | 735 "description": "Tokens, along with their syntactic informati
on, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.F
eatures.extract_syntax.", |
797 "items": { | 736 "items": { |
798 "$ref": "Token" | 737 "$ref": "Token" |
799 }, | 738 }, |
800 "type": "array" | 739 "type": "array" |
801 }, | 740 }, |
802 "entities": { | 741 "entities": { |
803 "description": "Entities, along with their semantic informat
ion, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.
Features.extract_entities.", | 742 "description": "Entities, along with their semantic informat
ion, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.
Features.extract_entities.", |
804 "items": { | 743 "items": { |
805 "$ref": "Entity" | 744 "$ref": "Entity" |
806 }, | 745 }, |
807 "type": "array" | 746 "type": "array" |
808 }, | |
809 "documentSentiment": { | |
810 "$ref": "Sentiment", | |
811 "description": "The overall sentiment for the document. Popu
lated if the user enables\nAnnotateTextRequest.Features.extract_document_sentime
nt." | |
812 } | 747 } |
813 }, | 748 }, |
814 "type": "object" | 749 "type": "object" |
815 }, | |
816 "AnalyzeSentimentRequest": { | |
817 "description": "The sentiment analysis request message.", | |
818 "id": "AnalyzeSentimentRequest", | |
819 "properties": { | |
820 "document": { | |
821 "$ref": "Document", | |
822 "description": "Input document." | |
823 }, | |
824 "encodingType": { | |
825 "description": "The encoding type used by the API to calcula
te sentence offsets.", | |
826 "enum": [ | |
827 "NONE", | |
828 "UTF8", | |
829 "UTF16", | |
830 "UTF32" | |
831 ], | |
832 "enumDescriptions": [ | |
833 "If `EncodingType` is not specified, encoding-dependent
information (such as\n`begin_offset`) will be set at `-1`.", | |
834 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-8 encoding of the input. C++ and Go are example
s of languages\nthat use this encoding natively.", | |
835 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-16 encoding of the input. Java and Javascript a
re examples of\nlanguages that use this encoding natively.", | |
836 "Encoding-dependent information (such as `begin_offset`)
is calculated based\non the UTF-32 encoding of the input. Python is an example
of a language\nthat uses this encoding natively." | |
837 ], | |
838 "type": "string" | |
839 } | |
840 }, | |
841 "type": "object" | |
842 }, | 750 }, |
843 "DependencyEdge": { | 751 "DependencyEdge": { |
844 "description": "Represents dependency parse tree information for a t
oken. (For more\ninformation on dependency labels, see\nhttp://www.aclweb.org/an
thology/P13-2017", | 752 "description": "Represents dependency parse tree information for a t
oken. (For more\ninformation on dependency labels, see\nhttp://www.aclweb.org/an
thology/P13-2017", |
845 "id": "DependencyEdge", | 753 "id": "DependencyEdge", |
846 "properties": { | 754 "properties": { |
847 "label": { | 755 "label": { |
848 "description": "The parse label for the token.", | 756 "description": "The parse label for the token.", |
849 "enum": [ | 757 "enum": [ |
850 "UNKNOWN", | 758 "UNKNOWN", |
851 "ABBREV", | 759 "ABBREV", |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 "type": "string" | 915 "type": "string" |
1008 }, | 916 }, |
1009 "headTokenIndex": { | 917 "headTokenIndex": { |
1010 "description": "Represents the head of this token in the dep
endency tree.\nThis is the index of the token which has an arc going to this tok
en.\nThe index is the position of the token in the array of tokens returned\nby
the API method. If this token is a root token, then the\n`head_token_index` is i
ts own index.", | 918 "description": "Represents the head of this token in the dep
endency tree.\nThis is the index of the token which has an arc going to this tok
en.\nThe index is the position of the token in the array of tokens returned\nby
the API method. If this token is a root token, then the\n`head_token_index` is i
ts own index.", |
1011 "format": "int32", | 919 "format": "int32", |
1012 "type": "integer" | 920 "type": "integer" |
1013 } | 921 } |
1014 }, | 922 }, |
1015 "type": "object" | 923 "type": "object" |
1016 }, | 924 }, |
1017 "TextSpan": { | |
1018 "description": "Represents an output piece of text.", | |
1019 "id": "TextSpan", | |
1020 "properties": { | |
1021 "beginOffset": { | |
1022 "description": "The API calculates the beginning offset of t
he content in the original\ndocument according to the EncodingType specified in
the API request.", | |
1023 "format": "int32", | |
1024 "type": "integer" | |
1025 }, | |
1026 "content": { | |
1027 "description": "The content of the output text.", | |
1028 "type": "string" | |
1029 } | |
1030 }, | |
1031 "type": "object" | |
1032 }, | |
1033 "Token": { | 925 "Token": { |
1034 "description": "Represents the smallest syntactic building block of
the text.", | 926 "description": "Represents the smallest syntactic building block of
the text.", |
1035 "id": "Token", | 927 "id": "Token", |
1036 "properties": { | 928 "properties": { |
| 929 "partOfSpeech": { |
| 930 "$ref": "PartOfSpeech", |
| 931 "description": "Parts of speech tag for this token." |
| 932 }, |
1037 "dependencyEdge": { | 933 "dependencyEdge": { |
1038 "$ref": "DependencyEdge", | 934 "$ref": "DependencyEdge", |
1039 "description": "Dependency tree parse for this token." | 935 "description": "Dependency tree parse for this token." |
1040 }, | 936 }, |
1041 "text": { | 937 "text": { |
1042 "$ref": "TextSpan", | 938 "$ref": "TextSpan", |
1043 "description": "The token text." | 939 "description": "The token text." |
1044 }, | 940 }, |
1045 "lemma": { | 941 "lemma": { |
1046 "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_
%28morphology%29) of the token.", | 942 "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_
%28morphology%29) of the token.", |
1047 "type": "string" | 943 "type": "string" |
1048 }, | |
1049 "partOfSpeech": { | |
1050 "$ref": "PartOfSpeech", | |
1051 "description": "Parts of speech tag for this token." | |
1052 } | 944 } |
1053 }, | 945 }, |
1054 "type": "object" | 946 "type": "object" |
| 947 }, |
| 948 "TextSpan": { |
| 949 "description": "Represents an output piece of text.", |
| 950 "id": "TextSpan", |
| 951 "properties": { |
| 952 "beginOffset": { |
| 953 "description": "The API calculates the beginning offset of t
he content in the original\ndocument according to the EncodingType specified in
the API request.", |
| 954 "format": "int32", |
| 955 "type": "integer" |
| 956 }, |
| 957 "content": { |
| 958 "description": "The content of the output text.", |
| 959 "type": "string" |
| 960 } |
| 961 }, |
| 962 "type": "object" |
1055 }, | 963 }, |
1056 "Status": { | 964 "Status": { |
1057 "description": "The `Status` type defines a logical error model that
is suitable for different\nprogramming environments, including REST APIs and RP
C APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is desig
ned to be:\n\n- Simple to use and understand for most users\n- Flexible enough t
o meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pie
ces of data: error code, error message,\nand error details. The error code shoul
d be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes
if needed. The\nerror message should be a developer-facing English message tha
t helps\ndevelopers *understand* and *resolve* the error. If a localized user-fa
cing\nerror message is needed, put the localized message in the error details or
\nlocalize it in the client. The optional error details may contain arbitrary\ni
nformation about the error. There is a predefined set of error detail types\nin
the package `google.rpc` that can be used for common error conditions.\n\n# Lang
uage mapping\n\nThe `Status` message is the logical representation of the error
model, but it\nis not necessarily the actual wire format. When the `Status` mess
age is\nexposed in different client libraries and different wire protocols, it c
an be\nmapped differently. For example, it will likely be mapped to some excepti
ons\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n
\nThe error model and the `Status` message can be used in a variety of\nenvironm
ents, either with or without APIs, to provide a\nconsistent developer experience
across different environments.\n\nExample uses of this error model include:\n\n
- Partial errors. If a service needs to return partial errors to the client,\n
it may embed the `Status` in the normal response to indicate the partial\n
errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step m
ay\n have a `Status` message for error reporting.\n\n- Batch operations. If a
client uses batch request and batch response, the\n `Status` message should
be used directly inside batch response, one for\n each error sub-response.\n\
n- Asynchronous operations. If an API call embeds asynchronous operation\n re
sults in its response, the status of those operations should be\n represented
directly using the `Status` message.\n\n- Logging. If some API errors are store
d in logs, the message `Status` could\n be used directly after any stripping
needed for security/privacy reasons.", | 965 "description": "The `Status` type defines a logical error model that
is suitable for different\nprogramming environments, including REST APIs and RP
C APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is desig
ned to be:\n\n- Simple to use and understand for most users\n- Flexible enough t
o meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pie
ces of data: error code, error message,\nand error details. The error code shoul
d be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes
if needed. The\nerror message should be a developer-facing English message tha
t helps\ndevelopers *understand* and *resolve* the error. If a localized user-fa
cing\nerror message is needed, put the localized message in the error details or
\nlocalize it in the client. The optional error details may contain arbitrary\ni
nformation about the error. There is a predefined set of error detail types\nin
the package `google.rpc` that can be used for common error conditions.\n\n# Lang
uage mapping\n\nThe `Status` message is the logical representation of the error
model, but it\nis not necessarily the actual wire format. When the `Status` mess
age is\nexposed in different client libraries and different wire protocols, it c
an be\nmapped differently. For example, it will likely be mapped to some excepti
ons\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n
\nThe error model and the `Status` message can be used in a variety of\nenvironm
ents, either with or without APIs, to provide a\nconsistent developer experience
across different environments.\n\nExample uses of this error model include:\n\n
- Partial errors. If a service needs to return partial errors to the client,\n
it may embed the `Status` in the normal response to indicate the partial\n
errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step m
ay\n have a `Status` message for error reporting.\n\n- Batch operations. If a
client uses batch request and batch response, the\n `Status` message should
be used directly inside batch response, one for\n each error sub-response.\n\
n- Asynchronous operations. If an API call embeds asynchronous operation\n re
sults in its response, the status of those operations should be\n represented
directly using the `Status` message.\n\n- Logging. If some API errors are store
d in logs, the message `Status` could\n be used directly after any stripping
needed for security/privacy reasons.", |
1058 "id": "Status", | 966 "id": "Status", |
1059 "properties": { | 967 "properties": { |
1060 "message": { | |
1061 "description": "A developer-facing error message, which shou
ld be in English. Any\nuser-facing error message should be localized and sent in
the\ngoogle.rpc.Status.details field, or localized by the client.", | |
1062 "type": "string" | |
1063 }, | |
1064 "details": { | 968 "details": { |
1065 "description": "A list of messages that carry the error deta
ils. There is a common set of\nmessage types for APIs to use.", | 969 "description": "A list of messages that carry the error deta
ils. There is a common set of\nmessage types for APIs to use.", |
1066 "items": { | 970 "items": { |
1067 "additionalProperties": { | 971 "additionalProperties": { |
1068 "description": "Properties of the object. Contains f
ield @type with type URL.", | 972 "description": "Properties of the object. Contains f
ield @type with type URL.", |
1069 "type": "any" | 973 "type": "any" |
1070 }, | 974 }, |
1071 "type": "object" | 975 "type": "object" |
1072 }, | 976 }, |
1073 "type": "array" | 977 "type": "array" |
1074 }, | 978 }, |
1075 "code": { | 979 "code": { |
1076 "description": "The status code, which should be an enum val
ue of google.rpc.Code.", | 980 "description": "The status code, which should be an enum val
ue of google.rpc.Code.", |
1077 "format": "int32", | 981 "format": "int32", |
1078 "type": "integer" | 982 "type": "integer" |
| 983 }, |
| 984 "message": { |
| 985 "description": "A developer-facing error message, which shou
ld be in English. Any\nuser-facing error message should be localized and sent in
the\ngoogle.rpc.Status.details field, or localized by the client.", |
| 986 "type": "string" |
1079 } | 987 } |
1080 }, | 988 }, |
1081 "type": "object" | 989 "type": "object" |
| 990 }, |
| 991 "Features": { |
| 992 "description": "All available features for sentiment, syntax, and se
mantic analysis.\nSetting each one to true will enable that specific analysis fo
r the input.", |
| 993 "id": "Features", |
| 994 "properties": { |
| 995 "extractEntities": { |
| 996 "description": "Extract entities.", |
| 997 "type": "boolean" |
| 998 }, |
| 999 "extractDocumentSentiment": { |
| 1000 "description": "Extract document-level sentiment.", |
| 1001 "type": "boolean" |
| 1002 }, |
| 1003 "extractSyntax": { |
| 1004 "description": "Extract syntax information.", |
| 1005 "type": "boolean" |
| 1006 } |
| 1007 }, |
| 1008 "type": "object" |
| 1009 }, |
| 1010 "EntityMention": { |
| 1011 "description": "Represents a mention for an entity in the text. Curr
ently, proper noun\nmentions are supported.", |
| 1012 "id": "EntityMention", |
| 1013 "properties": { |
| 1014 "type": { |
| 1015 "description": "The type of the entity mention.", |
| 1016 "enum": [ |
| 1017 "TYPE_UNKNOWN", |
| 1018 "PROPER", |
| 1019 "COMMON" |
| 1020 ], |
| 1021 "enumDescriptions": [ |
| 1022 "Unknown", |
| 1023 "Proper name", |
| 1024 "Common noun (or noun compound)" |
| 1025 ], |
| 1026 "type": "string" |
| 1027 }, |
| 1028 "text": { |
| 1029 "$ref": "TextSpan", |
| 1030 "description": "The mention text." |
| 1031 } |
| 1032 }, |
| 1033 "type": "object" |
| 1034 }, |
| 1035 "Sentence": { |
| 1036 "description": "Represents a sentence in the input document.", |
| 1037 "id": "Sentence", |
| 1038 "properties": { |
| 1039 "text": { |
| 1040 "$ref": "TextSpan", |
| 1041 "description": "The sentence text." |
| 1042 }, |
| 1043 "sentiment": { |
| 1044 "$ref": "Sentiment", |
| 1045 "description": "For calls to AnalyzeSentiment or if\nAnnotat
eTextRequest.Features.extract_document_sentiment is set to\ntrue, this field wil
l contain the sentiment for the sentence." |
| 1046 } |
| 1047 }, |
| 1048 "type": "object" |
| 1049 }, |
| 1050 "Document": { |
| 1051 "description": "####################################################
############ #\n\nRepresents the input to API methods.", |
| 1052 "id": "Document", |
| 1053 "properties": { |
| 1054 "gcsContentUri": { |
| 1055 "description": "The Google Cloud Storage URI where the file
content is located.\nThis URI must be of the form: gs://bucket_name/object_name.
For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nN
OTE: Cloud Storage object versioning is not supported.", |
| 1056 "type": "string" |
| 1057 }, |
| 1058 "language": { |
| 1059 "description": "The language of the document (if not specifi
ed, the language is\nautomatically detected). Both ISO and BCP-47 language codes
are\naccepted.<br>\n[Language Support](/natural-language/docs/languages)\nlists
currently supported languages for each API method.\nIf the language (either spe
cified by the caller or automatically detected)\nis not supported by the called
API method, an `INVALID_ARGUMENT` error\nis returned.", |
| 1060 "type": "string" |
| 1061 }, |
| 1062 "content": { |
| 1063 "description": "The content of the input in string format.", |
| 1064 "type": "string" |
| 1065 }, |
| 1066 "type": { |
| 1067 "description": "Required. If the type is not set or is `TYPE
_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.", |
| 1068 "enum": [ |
| 1069 "TYPE_UNSPECIFIED", |
| 1070 "PLAIN_TEXT", |
| 1071 "HTML" |
| 1072 ], |
| 1073 "enumDescriptions": [ |
| 1074 "The content type is not specified.", |
| 1075 "Plain text", |
| 1076 "HTML" |
| 1077 ], |
| 1078 "type": "string" |
| 1079 } |
| 1080 }, |
| 1081 "type": "object" |
1082 } | 1082 } |
1083 }, | 1083 }, |
1084 "servicePath": "", | 1084 "servicePath": "", |
1085 "title": "Google Cloud Natural Language API", | 1085 "title": "Google Cloud Natural Language API", |
1086 "version": "v1" | 1086 "version": "v1" |
1087 } | 1087 } |
OLD | NEW |