OLD | NEW |
1 { | 1 { |
2 "auth": { | 2 "auth": { |
3 "oauth2": { | 3 "oauth2": { |
4 "scopes": { | 4 "scopes": { |
5 "https://www.googleapis.com/auth/cloud-platform": { | 5 "https://www.googleapis.com/auth/cloud-platform": { |
6 "description": "View and manage your data across Google Clou
d Platform services" | 6 "description": "View and manage your data across Google Clou
d Platform services" |
7 } | 7 } |
8 } | 8 } |
9 } | 9 } |
10 }, | 10 }, |
11 "basePath": "", | 11 "basePath": "", |
12 "baseUrl": "https://language.googleapis.com/", | 12 "baseUrl": "https://language.googleapis.com/", |
13 "batchPath": "batch", | 13 "batchPath": "batch", |
14 "canonicalName": "Cloud Natural Language", | 14 "canonicalName": "Cloud Natural Language", |
15 "description": "Google Cloud Natural Language API provides natural language
understanding technologies to developers. Examples include sentiment analysis, e
ntity recognition, and text annotations.", | 15 "description": "Google Cloud Natural Language API provides natural language
understanding technologies to developers. Examples include sentiment analysis, e
ntity recognition, and text annotations.", |
16 "discoveryVersion": "v1", | 16 "discoveryVersion": "v1", |
17 "documentationLink": "https://cloud.google.com/natural-language/", | 17 "documentationLink": "https://cloud.google.com/natural-language/", |
18 "icons": { | 18 "icons": { |
19 "x16": "http://www.google.com/images/icons/product/search-16.gif", | 19 "x16": "http://www.google.com/images/icons/product/search-16.gif", |
20 "x32": "http://www.google.com/images/icons/product/search-32.gif" | 20 "x32": "http://www.google.com/images/icons/product/search-32.gif" |
21 }, | 21 }, |
22 "id": "language:v1", | 22 "id": "language:v1", |
23 "kind": "discovery#restDescription", | 23 "kind": "discovery#restDescription", |
24 "name": "language", | 24 "name": "language", |
25 "ownerDomain": "google.com", | 25 "ownerDomain": "google.com", |
26 "ownerName": "Google", | 26 "ownerName": "Google", |
27 "parameters": { | 27 "parameters": { |
28 "callback": { | 28 "upload_protocol": { |
29 "description": "JSONP", | 29 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", |
30 "location": "query", | 30 "location": "query", |
31 "type": "string" | 31 "type": "string" |
32 }, | 32 }, |
| 33 "prettyPrint": { |
| 34 "default": "true", |
| 35 "description": "Returns response with indentations and line breaks."
, |
| 36 "location": "query", |
| 37 "type": "boolean" |
| 38 }, |
| 39 "uploadType": { |
| 40 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", |
| 41 "location": "query", |
| 42 "type": "string" |
| 43 }, |
| 44 "fields": { |
| 45 "description": "Selector specifying which fields to include in a par
tial response.", |
| 46 "location": "query", |
| 47 "type": "string" |
| 48 }, |
33 "$.xgafv": { | 49 "$.xgafv": { |
34 "description": "V1 error format.", | 50 "description": "V1 error format.", |
35 "enum": [ | 51 "enum": [ |
36 "1", | 52 "1", |
37 "2" | 53 "2" |
38 ], | 54 ], |
39 "enumDescriptions": [ | 55 "enumDescriptions": [ |
40 "v1 error format", | 56 "v1 error format", |
41 "v2 error format" | 57 "v2 error format" |
42 ], | 58 ], |
43 "location": "query", | 59 "location": "query", |
44 "type": "string" | 60 "type": "string" |
45 }, | 61 }, |
| 62 "callback": { |
| 63 "description": "JSONP", |
| 64 "location": "query", |
| 65 "type": "string" |
| 66 }, |
46 "alt": { | 67 "alt": { |
47 "default": "json", | 68 "default": "json", |
48 "description": "Data format for response.", | 69 "description": "Data format for response.", |
49 "enum": [ | 70 "enum": [ |
50 "json", | 71 "json", |
51 "media", | 72 "media", |
52 "proto" | 73 "proto" |
53 ], | 74 ], |
54 "enumDescriptions": [ | 75 "enumDescriptions": [ |
55 "Responses with Content-Type of application/json", | 76 "Responses with Content-Type of application/json", |
56 "Media download with context-dependent Content-Type", | 77 "Media download with context-dependent Content-Type", |
57 "Responses with Content-Type of application/x-protobuf" | 78 "Responses with Content-Type of application/x-protobuf" |
58 ], | 79 ], |
59 "location": "query", | 80 "location": "query", |
60 "type": "string" | 81 "type": "string" |
61 }, | 82 }, |
| 83 "key": { |
| 84 "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.", |
| 85 "location": "query", |
| 86 "type": "string" |
| 87 }, |
62 "access_token": { | 88 "access_token": { |
63 "description": "OAuth access token.", | 89 "description": "OAuth access token.", |
64 "location": "query", | 90 "location": "query", |
65 "type": "string" | 91 "type": "string" |
66 }, | 92 }, |
67 "key": { | |
68 "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.", | |
69 "location": "query", | |
70 "type": "string" | |
71 }, | |
72 "quotaUser": { | 93 "quotaUser": { |
73 "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.", | 94 "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.", |
74 "location": "query", | 95 "location": "query", |
75 "type": "string" | 96 "type": "string" |
76 }, | 97 }, |
77 "pp": { | 98 "pp": { |
78 "default": "true", | 99 "default": "true", |
79 "description": "Pretty-print response.", | 100 "description": "Pretty-print response.", |
80 "location": "query", | 101 "location": "query", |
81 "type": "boolean" | 102 "type": "boolean" |
82 }, | 103 }, |
83 "bearer_token": { | |
84 "description": "OAuth bearer token.", | |
85 "location": "query", | |
86 "type": "string" | |
87 }, | |
88 "oauth_token": { | 104 "oauth_token": { |
89 "description": "OAuth 2.0 token for the current user.", | 105 "description": "OAuth 2.0 token for the current user.", |
90 "location": "query", | 106 "location": "query", |
91 "type": "string" | 107 "type": "string" |
92 }, | 108 }, |
93 "upload_protocol": { | 109 "bearer_token": { |
94 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", | 110 "description": "OAuth bearer token.", |
95 "location": "query", | |
96 "type": "string" | |
97 }, | |
98 "prettyPrint": { | |
99 "default": "true", | |
100 "description": "Returns response with indentations and line breaks."
, | |
101 "location": "query", | |
102 "type": "boolean" | |
103 }, | |
104 "uploadType": { | |
105 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", | |
106 "location": "query", | |
107 "type": "string" | |
108 }, | |
109 "fields": { | |
110 "description": "Selector specifying which fields to include in a par
tial response.", | |
111 "location": "query", | 111 "location": "query", |
112 "type": "string" | 112 "type": "string" |
113 } | 113 } |
114 }, | 114 }, |
115 "protocol": "rest", | 115 "protocol": "rest", |
116 "resources": { | 116 "resources": { |
117 "documents": { | 117 "documents": { |
118 "methods": { | 118 "methods": { |
119 "annotateText": { | |
120 "description": "A convenience method that provides all the f
eatures that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in on
e call.", | |
121 "httpMethod": "POST", | |
122 "id": "language.documents.annotateText", | |
123 "parameterOrder": [], | |
124 "parameters": {}, | |
125 "path": "v1/documents:annotateText", | |
126 "request": { | |
127 "$ref": "AnnotateTextRequest" | |
128 }, | |
129 "response": { | |
130 "$ref": "AnnotateTextResponse" | |
131 }, | |
132 "scopes": [ | |
133 "https://www.googleapis.com/auth/cloud-platform" | |
134 ] | |
135 }, | |
136 "analyzeEntities": { | 119 "analyzeEntities": { |
137 "description": "Finds named entities (currently finds proper
names) in the text,\nentity types, salience, mentions for each entity, and othe
r properties.", | 120 "description": "Finds named entities (currently finds proper
names) in the text,\nentity types, salience, mentions for each entity, and othe
r properties.", |
138 "httpMethod": "POST", | 121 "httpMethod": "POST", |
139 "id": "language.documents.analyzeEntities", | 122 "id": "language.documents.analyzeEntities", |
140 "parameterOrder": [], | 123 "parameterOrder": [], |
141 "parameters": {}, | 124 "parameters": {}, |
142 "path": "v1/documents:analyzeEntities", | 125 "path": "v1/documents:analyzeEntities", |
143 "request": { | 126 "request": { |
144 "$ref": "AnalyzeEntitiesRequest" | 127 "$ref": "AnalyzeEntitiesRequest" |
145 }, | 128 }, |
(...skipping 30 matching lines...) Expand all Loading... |
176 "path": "v1/documents:analyzeSentiment", | 159 "path": "v1/documents:analyzeSentiment", |
177 "request": { | 160 "request": { |
178 "$ref": "AnalyzeSentimentRequest" | 161 "$ref": "AnalyzeSentimentRequest" |
179 }, | 162 }, |
180 "response": { | 163 "response": { |
181 "$ref": "AnalyzeSentimentResponse" | 164 "$ref": "AnalyzeSentimentResponse" |
182 }, | 165 }, |
183 "scopes": [ | 166 "scopes": [ |
184 "https://www.googleapis.com/auth/cloud-platform" | 167 "https://www.googleapis.com/auth/cloud-platform" |
185 ] | 168 ] |
| 169 }, |
| 170 "annotateText": { |
| 171 "description": "A convenience method that provides all the f
eatures that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in on
e call.", |
| 172 "httpMethod": "POST", |
| 173 "id": "language.documents.annotateText", |
| 174 "parameterOrder": [], |
| 175 "parameters": {}, |
| 176 "path": "v1/documents:annotateText", |
| 177 "request": { |
| 178 "$ref": "AnnotateTextRequest" |
| 179 }, |
| 180 "response": { |
| 181 "$ref": "AnnotateTextResponse" |
| 182 }, |
| 183 "scopes": [ |
| 184 "https://www.googleapis.com/auth/cloud-platform" |
| 185 ] |
186 } | 186 } |
187 } | 187 } |
188 } | 188 } |
189 }, | 189 }, |
190 "revision": "20170206", | 190 "revision": "20170301", |
191 "rootUrl": "https://language.googleapis.com/", | 191 "rootUrl": "https://language.googleapis.com/", |
192 "schemas": { | 192 "schemas": { |
193 "Token": { | |
194 "description": "Represents the smallest syntactic building block of
the text.", | |
195 "id": "Token", | |
196 "properties": { | |
197 "partOfSpeech": { | |
198 "$ref": "PartOfSpeech", | |
199 "description": "Parts of speech tag for this token." | |
200 }, | |
201 "text": { | |
202 "$ref": "TextSpan", | |
203 "description": "The token text." | |
204 }, | |
205 "dependencyEdge": { | |
206 "$ref": "DependencyEdge", | |
207 "description": "Dependency tree parse for this token." | |
208 }, | |
209 "lemma": { | |
210 "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_
%28morphology%29) of the token.", | |
211 "type": "string" | |
212 } | |
213 }, | |
214 "type": "object" | |
215 }, | |
216 "TextSpan": { | |
217 "description": "Represents an output piece of text.", | |
218 "id": "TextSpan", | |
219 "properties": { | |
220 "beginOffset": { | |
221 "description": "The API calculates the beginning offset of t
he content in the original\ndocument according to the EncodingType specified in
the API request.", | |
222 "format": "int32", | |
223 "type": "integer" | |
224 }, | |
225 "content": { | |
226 "description": "The content of the output text.", | |
227 "type": "string" | |
228 } | |
229 }, | |
230 "type": "object" | |
231 }, | |
232 "Status": { | |
233 "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` which can be used for common error conditions.\n\n# Lan
guage 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` mes
sage is\nexposed in different client libraries and different wire protocols, it
can be\nmapped differently. For example, it will likely be mapped to some except
ions\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\nenviron
ments, either with or without APIs, to provide a\nconsistent developer experienc
e 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
may\n have a `Status` message for error reporting purpose.\n\n- Batch operati
ons. If a client uses batch request and batch response, the\n `Status` messag
e should be used directly inside batch response, one for\n each error sub-res
ponse.\n\n- Asynchronous operations. If an API call embeds asynchronous operatio
n\n results in its response, the status of those operations should be\n re
presented directly using the `Status` message.\n\n- Logging. If some API errors
are stored in logs, the message `Status` could\n be used directly after any s
tripping needed for security/privacy reasons.", | |
234 "id": "Status", | |
235 "properties": { | |
236 "details": { | |
237 "description": "A list of messages that carry the error deta
ils. There will be a\ncommon set of message types for APIs to use.", | |
238 "items": { | |
239 "additionalProperties": { | |
240 "description": "Properties of the object. Contains f
ield @type with type URL.", | |
241 "type": "any" | |
242 }, | |
243 "type": "object" | |
244 }, | |
245 "type": "array" | |
246 }, | |
247 "code": { | |
248 "description": "The status code, which should be an enum val
ue of google.rpc.Code.", | |
249 "format": "int32", | |
250 "type": "integer" | |
251 }, | |
252 "message": { | |
253 "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.", | |
254 "type": "string" | |
255 } | |
256 }, | |
257 "type": "object" | |
258 }, | |
259 "EntityMention": { | 193 "EntityMention": { |
260 "description": "Represents a mention for an entity in the text. Curr
ently, proper noun\nmentions are supported.", | 194 "description": "Represents a mention for an entity in the text. Curr
ently, proper noun\nmentions are supported.", |
261 "id": "EntityMention", | 195 "id": "EntityMention", |
262 "properties": { | 196 "properties": { |
263 "text": { | 197 "text": { |
264 "$ref": "TextSpan", | 198 "$ref": "TextSpan", |
265 "description": "The mention text." | 199 "description": "The mention text." |
266 }, | 200 }, |
267 "type": { | 201 "type": { |
268 "description": "The type of the entity mention.", | 202 "description": "The type of the entity mention.", |
269 "enum": [ | 203 "enum": [ |
270 "TYPE_UNKNOWN", | 204 "TYPE_UNKNOWN", |
271 "PROPER", | 205 "PROPER", |
272 "COMMON" | 206 "COMMON" |
273 ], | 207 ], |
274 "enumDescriptions": [ | 208 "enumDescriptions": [ |
275 "Unknown", | 209 "Unknown", |
276 "Proper name", | 210 "Proper name", |
277 "Common noun (or noun compound)" | 211 "Common noun (or noun compound)" |
278 ], | 212 ], |
279 "type": "string" | 213 "type": "string" |
280 } | 214 } |
281 }, | 215 }, |
282 "type": "object" | 216 "type": "object" |
283 }, | 217 }, |
284 "Features": { | 218 "Features": { |
285 "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.", | 219 "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.", |
286 "id": "Features", | 220 "id": "Features", |
287 "properties": { | 221 "properties": { |
| 222 "extractEntities": { |
| 223 "description": "Extract entities.", |
| 224 "type": "boolean" |
| 225 }, |
288 "extractSyntax": { | 226 "extractSyntax": { |
289 "description": "Extract syntax information.", | 227 "description": "Extract syntax information.", |
290 "type": "boolean" | 228 "type": "boolean" |
291 }, | 229 }, |
292 "extractDocumentSentiment": { | 230 "extractDocumentSentiment": { |
293 "description": "Extract document-level sentiment.", | 231 "description": "Extract document-level sentiment.", |
294 "type": "boolean" | 232 "type": "boolean" |
295 }, | |
296 "extractEntities": { | |
297 "description": "Extract entities.", | |
298 "type": "boolean" | |
299 } | 233 } |
300 }, | 234 }, |
301 "type": "object" | 235 "type": "object" |
302 }, | 236 }, |
303 "Document": { | 237 "Document": { |
304 "description": "####################################################
############ #\n\nRepresents the input to API methods.", | 238 "description": "####################################################
############ #\n\nRepresents the input to API methods.", |
305 "id": "Document", | 239 "id": "Document", |
306 "properties": { | 240 "properties": { |
307 "language": { | 241 "language": { |
308 "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**Current Language Restrictions:**\n\n * Only English, Span
ish, and Japanese textual content are supported.\nIf the language (either specif
ied by the caller or automatically detected)\nis not supported by the called API
method, an `INVALID_ARGUMENT` error\nis returned.", | 242 "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**Current Language Restrictions:**\n\n * Only English, Span
ish, and Japanese textual content are supported.\nIf the language (either specif
ied by the caller or automatically detected)\nis not supported by the called API
method, an `INVALID_ARGUMENT` error\nis returned.", |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 }, | 639 }, |
706 "type": "array" | 640 "type": "array" |
707 } | 641 } |
708 }, | 642 }, |
709 "type": "object" | 643 "type": "object" |
710 }, | 644 }, |
711 "AnalyzeEntitiesResponse": { | 645 "AnalyzeEntitiesResponse": { |
712 "description": "The entity analysis response message.", | 646 "description": "The entity analysis response message.", |
713 "id": "AnalyzeEntitiesResponse", | 647 "id": "AnalyzeEntitiesResponse", |
714 "properties": { | 648 "properties": { |
| 649 "language": { |
| 650 "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.", |
| 651 "type": "string" |
| 652 }, |
715 "entities": { | 653 "entities": { |
716 "description": "The recognized entities in the input documen
t.", | 654 "description": "The recognized entities in the input documen
t.", |
717 "items": { | 655 "items": { |
718 "$ref": "Entity" | 656 "$ref": "Entity" |
719 }, | 657 }, |
720 "type": "array" | 658 "type": "array" |
721 }, | 659 } |
| 660 }, |
| 661 "type": "object" |
| 662 }, |
| 663 "AnalyzeSyntaxResponse": { |
| 664 "description": "The syntax analysis response message.", |
| 665 "id": "AnalyzeSyntaxResponse", |
| 666 "properties": { |
722 "language": { | 667 "language": { |
723 "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.", | 668 "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 "type": "string" | 669 "type": "string" |
| 670 }, |
| 671 "sentences": { |
| 672 "description": "Sentences in the input document.", |
| 673 "items": { |
| 674 "$ref": "Sentence" |
| 675 }, |
| 676 "type": "array" |
| 677 }, |
| 678 "tokens": { |
| 679 "description": "Tokens, along with their syntactic informati
on, in the input document.", |
| 680 "items": { |
| 681 "$ref": "Token" |
| 682 }, |
| 683 "type": "array" |
725 } | 684 } |
726 }, | 685 }, |
727 "type": "object" | 686 "type": "object" |
728 }, | 687 }, |
729 "Entity": { | 688 "Entity": { |
730 "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.", | 689 "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.", |
731 "id": "Entity", | 690 "id": "Entity", |
732 "properties": { | 691 "properties": { |
| 692 "name": { |
| 693 "description": "The representative name for the entity.", |
| 694 "type": "string" |
| 695 }, |
733 "type": { | 696 "type": { |
734 "description": "The entity type.", | 697 "description": "The entity type.", |
735 "enum": [ | 698 "enum": [ |
736 "UNKNOWN", | 699 "UNKNOWN", |
737 "PERSON", | 700 "PERSON", |
738 "LOCATION", | 701 "LOCATION", |
739 "ORGANIZATION", | 702 "ORGANIZATION", |
740 "EVENT", | 703 "EVENT", |
741 "WORK_OF_ART", | 704 "WORK_OF_ART", |
742 "CONSUMER_GOOD", | 705 "CONSUMER_GOOD", |
(...skipping 22 matching lines...) Expand all Loading... |
765 "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.", | 728 "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.", |
766 "format": "float", | 729 "format": "float", |
767 "type": "number" | 730 "type": "number" |
768 }, | 731 }, |
769 "mentions": { | 732 "mentions": { |
770 "description": "The mentions of this entity in the input doc
ument. The API currently\nsupports proper noun mentions.", | 733 "description": "The mentions of this entity in the input doc
ument. The API currently\nsupports proper noun mentions.", |
771 "items": { | 734 "items": { |
772 "$ref": "EntityMention" | 735 "$ref": "EntityMention" |
773 }, | 736 }, |
774 "type": "array" | 737 "type": "array" |
775 }, | |
776 "name": { | |
777 "description": "The representative name for the entity.", | |
778 "type": "string" | |
779 } | 738 } |
780 }, | 739 }, |
781 "type": "object" | 740 "type": "object" |
782 }, | |
783 "AnalyzeSyntaxResponse": { | |
784 "description": "The syntax analysis response message.", | |
785 "id": "AnalyzeSyntaxResponse", | |
786 "properties": { | |
787 "sentences": { | |
788 "description": "Sentences in the input document.", | |
789 "items": { | |
790 "$ref": "Sentence" | |
791 }, | |
792 "type": "array" | |
793 }, | |
794 "tokens": { | |
795 "description": "Tokens, along with their syntactic informati
on, in the input document.", | |
796 "items": { | |
797 "$ref": "Token" | |
798 }, | |
799 "type": "array" | |
800 }, | |
801 "language": { | |
802 "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.", | |
803 "type": "string" | |
804 } | |
805 }, | |
806 "type": "object" | |
807 }, | 741 }, |
808 "AnnotateTextRequest": { | 742 "AnnotateTextRequest": { |
809 "description": "The request message for the text annotation API, whi
ch can perform multiple\nanalysis types (sentiment, entities, and syntax) in one
call.", | 743 "description": "The request message for the text annotation API, whi
ch can perform multiple\nanalysis types (sentiment, entities, and syntax) in one
call.", |
810 "id": "AnnotateTextRequest", | 744 "id": "AnnotateTextRequest", |
811 "properties": { | 745 "properties": { |
812 "encodingType": { | 746 "encodingType": { |
813 "description": "The encoding type used by the API to calcula
te offsets.", | 747 "description": "The encoding type used by the API to calcula
te offsets.", |
814 "enum": [ | 748 "enum": [ |
815 "NONE", | 749 "NONE", |
816 "UTF8", | 750 "UTF8", |
(...skipping 12 matching lines...) Expand all Loading... |
829 "$ref": "Document", | 763 "$ref": "Document", |
830 "description": "Input document." | 764 "description": "Input document." |
831 }, | 765 }, |
832 "features": { | 766 "features": { |
833 "$ref": "Features", | 767 "$ref": "Features", |
834 "description": "The enabled features." | 768 "description": "The enabled features." |
835 } | 769 } |
836 }, | 770 }, |
837 "type": "object" | 771 "type": "object" |
838 }, | 772 }, |
| 773 "AnalyzeSentimentRequest": { |
| 774 "description": "The sentiment analysis request message.", |
| 775 "id": "AnalyzeSentimentRequest", |
| 776 "properties": { |
| 777 "encodingType": { |
| 778 "description": "The encoding type used by the API to calcula
te sentence offsets.", |
| 779 "enum": [ |
| 780 "NONE", |
| 781 "UTF8", |
| 782 "UTF16", |
| 783 "UTF32" |
| 784 ], |
| 785 "enumDescriptions": [ |
| 786 "If `EncodingType` is not specified, encoding-dependent
information (such as\n`begin_offset`) will be set at `-1`.", |
| 787 "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.", |
| 788 "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.", |
| 789 "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." |
| 790 ], |
| 791 "type": "string" |
| 792 }, |
| 793 "document": { |
| 794 "$ref": "Document", |
| 795 "description": "Input document. Currently, `analyzeSentiment
` only supports English text\n(Document.language=\"EN\")." |
| 796 } |
| 797 }, |
| 798 "type": "object" |
| 799 }, |
839 "AnnotateTextResponse": { | 800 "AnnotateTextResponse": { |
840 "description": "The text annotations response message.", | 801 "description": "The text annotations response message.", |
841 "id": "AnnotateTextResponse", | 802 "id": "AnnotateTextResponse", |
842 "properties": { | 803 "properties": { |
843 "documentSentiment": { | 804 "documentSentiment": { |
844 "$ref": "Sentiment", | 805 "$ref": "Sentiment", |
845 "description": "The overall sentiment for the document. Popu
lated if the user enables\nAnnotateTextRequest.Features.extract_document_sentime
nt." | 806 "description": "The overall sentiment for the document. Popu
lated if the user enables\nAnnotateTextRequest.Features.extract_document_sentime
nt." |
846 }, | 807 }, |
847 "language": { | 808 "language": { |
848 "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.", | 809 "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.", |
(...skipping 16 matching lines...) Expand all Loading... |
865 "entities": { | 826 "entities": { |
866 "description": "Entities, along with their semantic informat
ion, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.
Features.extract_entities.", | 827 "description": "Entities, along with their semantic informat
ion, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.
Features.extract_entities.", |
867 "items": { | 828 "items": { |
868 "$ref": "Entity" | 829 "$ref": "Entity" |
869 }, | 830 }, |
870 "type": "array" | 831 "type": "array" |
871 } | 832 } |
872 }, | 833 }, |
873 "type": "object" | 834 "type": "object" |
874 }, | 835 }, |
875 "AnalyzeSentimentRequest": { | |
876 "description": "The sentiment analysis request message.", | |
877 "id": "AnalyzeSentimentRequest", | |
878 "properties": { | |
879 "encodingType": { | |
880 "description": "The encoding type used by the API to calcula
te sentence offsets.", | |
881 "enum": [ | |
882 "NONE", | |
883 "UTF8", | |
884 "UTF16", | |
885 "UTF32" | |
886 ], | |
887 "enumDescriptions": [ | |
888 "If `EncodingType` is not specified, encoding-dependent
information (such as\n`begin_offset`) will be set at `-1`.", | |
889 "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.", | |
890 "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.", | |
891 "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." | |
892 ], | |
893 "type": "string" | |
894 }, | |
895 "document": { | |
896 "$ref": "Document", | |
897 "description": "Input document. Currently, `analyzeSentiment
` only supports English text\n(Document.language=\"EN\")." | |
898 } | |
899 }, | |
900 "type": "object" | |
901 }, | |
902 "DependencyEdge": { | 836 "DependencyEdge": { |
903 "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", | 837 "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", |
904 "id": "DependencyEdge", | 838 "id": "DependencyEdge", |
905 "properties": { | 839 "properties": { |
906 "headTokenIndex": { | |
907 "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.", | |
908 "format": "int32", | |
909 "type": "integer" | |
910 }, | |
911 "label": { | 840 "label": { |
912 "description": "The parse label for the token.", | 841 "description": "The parse label for the token.", |
913 "enum": [ | 842 "enum": [ |
914 "UNKNOWN", | 843 "UNKNOWN", |
915 "ABBREV", | 844 "ABBREV", |
916 "ACOMP", | 845 "ACOMP", |
917 "ADVCL", | 846 "ADVCL", |
918 "ADVMOD", | 847 "ADVMOD", |
919 "AMOD", | 848 "AMOD", |
920 "APPOS", | 849 "APPOS", |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 "Keyword", | 991 "Keyword", |
1063 "List for chains of comparable items", | 992 "List for chains of comparable items", |
1064 "Nominalized clause", | 993 "Nominalized clause", |
1065 "Nominalized clausal subject", | 994 "Nominalized clausal subject", |
1066 "Nominalized clausal passive", | 995 "Nominalized clausal passive", |
1067 "Compound of numeric modifier", | 996 "Compound of numeric modifier", |
1068 "Copula", | 997 "Copula", |
1069 "Dislocated relation (for fronted/topicalized elements)" | 998 "Dislocated relation (for fronted/topicalized elements)" |
1070 ], | 999 ], |
1071 "type": "string" | 1000 "type": "string" |
| 1001 }, |
| 1002 "headTokenIndex": { |
| 1003 "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.", |
| 1004 "format": "int32", |
| 1005 "type": "integer" |
| 1006 } |
| 1007 }, |
| 1008 "type": "object" |
| 1009 }, |
| 1010 "TextSpan": { |
| 1011 "description": "Represents an output piece of text.", |
| 1012 "id": "TextSpan", |
| 1013 "properties": { |
| 1014 "beginOffset": { |
| 1015 "description": "The API calculates the beginning offset of t
he content in the original\ndocument according to the EncodingType specified in
the API request.", |
| 1016 "format": "int32", |
| 1017 "type": "integer" |
| 1018 }, |
| 1019 "content": { |
| 1020 "description": "The content of the output text.", |
| 1021 "type": "string" |
1072 } | 1022 } |
1073 }, | 1023 }, |
1074 "type": "object" | 1024 "type": "object" |
| 1025 }, |
| 1026 "Token": { |
| 1027 "description": "Represents the smallest syntactic building block of
the text.", |
| 1028 "id": "Token", |
| 1029 "properties": { |
| 1030 "text": { |
| 1031 "$ref": "TextSpan", |
| 1032 "description": "The token text." |
| 1033 }, |
| 1034 "dependencyEdge": { |
| 1035 "$ref": "DependencyEdge", |
| 1036 "description": "Dependency tree parse for this token." |
| 1037 }, |
| 1038 "lemma": { |
| 1039 "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_
%28morphology%29) of the token.", |
| 1040 "type": "string" |
| 1041 }, |
| 1042 "partOfSpeech": { |
| 1043 "$ref": "PartOfSpeech", |
| 1044 "description": "Parts of speech tag for this token." |
| 1045 } |
| 1046 }, |
| 1047 "type": "object" |
| 1048 }, |
| 1049 "Status": { |
| 1050 "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` which can be used for common error conditions.\n\n# Lan
guage 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` mes
sage is\nexposed in different client libraries and different wire protocols, it
can be\nmapped differently. For example, it will likely be mapped to some except
ions\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\nenviron
ments, either with or without APIs, to provide a\nconsistent developer experienc
e 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
may\n have a `Status` message for error reporting purpose.\n\n- Batch operati
ons. If a client uses batch request and batch response, the\n `Status` messag
e should be used directly inside batch response, one for\n each error sub-res
ponse.\n\n- Asynchronous operations. If an API call embeds asynchronous operatio
n\n results in its response, the status of those operations should be\n re
presented directly using the `Status` message.\n\n- Logging. If some API errors
are stored in logs, the message `Status` could\n be used directly after any s
tripping needed for security/privacy reasons.", |
| 1051 "id": "Status", |
| 1052 "properties": { |
| 1053 "code": { |
| 1054 "description": "The status code, which should be an enum val
ue of google.rpc.Code.", |
| 1055 "format": "int32", |
| 1056 "type": "integer" |
| 1057 }, |
| 1058 "message": { |
| 1059 "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.", |
| 1060 "type": "string" |
| 1061 }, |
| 1062 "details": { |
| 1063 "description": "A list of messages that carry the error deta
ils. There will be a\ncommon set of message types for APIs to use.", |
| 1064 "items": { |
| 1065 "additionalProperties": { |
| 1066 "description": "Properties of the object. Contains f
ield @type with type URL.", |
| 1067 "type": "any" |
| 1068 }, |
| 1069 "type": "object" |
| 1070 }, |
| 1071 "type": "array" |
| 1072 } |
| 1073 }, |
| 1074 "type": "object" |
1075 } | 1075 } |
1076 }, | 1076 }, |
1077 "servicePath": "", | 1077 "servicePath": "", |
1078 "title": "Google Cloud Natural Language API", | 1078 "title": "Google Cloud Natural Language API", |
1079 "version": "v1" | 1079 "version": "v1" |
1080 } | 1080 } |
OLD | NEW |