blob: 5f014c23803753fedeaaad83065ba35cc01789fa [file] [log] [blame]
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="language_v1beta1.html">Google Cloud Natural Language API</a> . <a href="language_v1beta1.documents.html">documents</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#analyzeEntities">analyzeEntities(body, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070079<p class="firstline">Finds named entities (currently proper names and common nouns) in the text</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070080<p class="toc_element">
81 <code><a href="#analyzeSentiment">analyzeSentiment(body, x__xgafv=None)</a></code></p>
82<p class="firstline">Analyzes the sentiment of the provided text.</p>
83<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080084 <code><a href="#analyzeSyntax">analyzeSyntax(body, x__xgafv=None)</a></code></p>
85<p class="firstline">Analyzes the syntax of the text and provides sentence boundaries and</p>
86<p class="toc_element">
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070087 <code><a href="#annotateText">annotateText(body, x__xgafv=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070088<p class="firstline">A convenience method that provides all the features that analyzeSentiment,</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070089<h3>Method Details</h3>
90<div class="method">
91 <code class="details" id="analyzeEntities">analyzeEntities(body, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070092 <pre>Finds named entities (currently proper names and common nouns) in the text
93along with entity types, salience, mentions for each entity, and
94other properties.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -070095
96Args:
97 body: object, The request body. (required)
98 The object takes the form of:
99
100{ # The entity analysis request message.
Thomas Coffee2f245372017-03-27 10:39:26 -0700101 "encodingType": "A String", # The encoding type used by the API to calculate offsets.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700102 "document": { # ################################################################ # # Input document.
103 #
104 # Represents the input to API methods.
105 "content": "A String", # The content of the input in string format.
106 "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
107 # returns an `INVALID_ARGUMENT` error.
108 "language": "A String", # The language of the document (if not specified, the language is
109 # automatically detected). Both ISO and BCP-47 language codes are
110 # accepted.<br>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400111 # [Language Support](/natural-language/docs/languages)
112 # lists currently supported languages for each API method.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700113 # If the language (either specified by the caller or automatically detected)
114 # is not supported by the called API method, an `INVALID_ARGUMENT` error
115 # is returned.
116 "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800117 # This URI must be of the form: gs://bucket_name/object_name. For more
118 # details, see https://cloud.google.com/storage/docs/reference-uris.
119 # NOTE: Cloud Storage object versioning is not supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700120 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700121 }
122
123 x__xgafv: string, V1 error format.
124 Allowed values
125 1 - v1 error format
126 2 - v2 error format
127
128Returns:
129 An object of the form:
130
131 { # The entity analysis response message.
132 "entities": [ # The recognized entities in the input document.
133 { # Represents a phrase in the text that is a known entity, such as
134 # a person, an organization, or location. The API associates information, such
135 # as salience and mentions, with entities.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700136 "mentions": [ # The mentions of this entity in the input document. The API currently
137 # supports proper noun mentions.
138 { # Represents a mention for an entity in the text. Currently, proper noun
139 # mentions are supported.
140 "text": { # Represents an output piece of text. # The mention text.
141 "content": "A String", # The content of the output text.
142 "beginOffset": 42, # The API calculates the beginning offset of the content in the original
143 # document according to the EncodingType specified in the API request.
144 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800145 "type": "A String", # The type of the entity mention.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700146 },
147 ],
148 "salience": 3.14, # The salience score associated with the entity in the [0, 1.0] range.
149 #
150 # The salience score for an entity provides information about the
151 # importance or centrality of that entity to the entire document text.
152 # Scores closer to 0 are less salient, while scores closer to 1.0 are highly
153 # salient.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400154 "type": "A String", # The entity type.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700155 "name": "A String", # The representative name for the entity.
156 "metadata": { # Metadata associated with the entity.
157 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800158 # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
159 # available. The associated keys are "wikipedia_url" and "mid", respectively.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700160 "a_key": "A String",
161 },
162 },
163 ],
164 "language": "A String", # The language of the text, which will be the same as the language specified
165 # in the request or, if not specified, the automatically-detected language.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700166 # See Document.language field for more details.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700167 }</pre>
168</div>
169
170<div class="method">
171 <code class="details" id="analyzeSentiment">analyzeSentiment(body, x__xgafv=None)</code>
172 <pre>Analyzes the sentiment of the provided text.
173
174Args:
175 body: object, The request body. (required)
176 The object takes the form of:
177
178{ # The sentiment analysis request message.
Thomas Coffee2f245372017-03-27 10:39:26 -0700179 "encodingType": "A String", # The encoding type used by the API to calculate sentence offsets for the
180 # sentence sentiment.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400181 "document": { # ################################################################ # # Input document.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700182 #
183 # Represents the input to API methods.
184 "content": "A String", # The content of the input in string format.
185 "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
186 # returns an `INVALID_ARGUMENT` error.
187 "language": "A String", # The language of the document (if not specified, the language is
188 # automatically detected). Both ISO and BCP-47 language codes are
189 # accepted.<br>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400190 # [Language Support](/natural-language/docs/languages)
191 # lists currently supported languages for each API method.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700192 # If the language (either specified by the caller or automatically detected)
193 # is not supported by the called API method, an `INVALID_ARGUMENT` error
194 # is returned.
195 "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800196 # This URI must be of the form: gs://bucket_name/object_name. For more
197 # details, see https://cloud.google.com/storage/docs/reference-uris.
198 # NOTE: Cloud Storage object versioning is not supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700199 },
200 }
201
202 x__xgafv: string, V1 error format.
203 Allowed values
204 1 - v1 error format
205 2 - v2 error format
206
207Returns:
208 An object of the form:
209
210 { # The sentiment analysis response message.
211 "documentSentiment": { # Represents the feeling associated with the entire text or entities in # The overall sentiment of the input document.
212 # the text.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800213 "polarity": 3.14, # DEPRECATED FIELD - This field is being deprecated in
214 # favor of score. Please refer to our documentation at
215 # https://cloud.google.com/natural-language/docs for more information.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400216 "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
217 # (positive sentiment).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700218 "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800219 # the absolute magnitude of sentiment regardless of score (positive or
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700220 # negative).
221 },
222 "language": "A String", # The language of the text, which will be the same as the language specified
223 # in the request or, if not specified, the automatically-detected language.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400224 # See Document.language field for more details.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800225 "sentences": [ # The sentiment for all the sentences in the document.
226 { # Represents a sentence in the input document.
227 "text": { # Represents an output piece of text. # The sentence text.
228 "content": "A String", # The content of the output text.
229 "beginOffset": 42, # The API calculates the beginning offset of the content in the original
230 # document according to the EncodingType specified in the API request.
231 },
232 "sentiment": { # Represents the feeling associated with the entire text or entities in # For calls to AnalyzeSentiment or if
233 # AnnotateTextRequest.Features.extract_document_sentiment is set to
234 # true, this field will contain the sentiment for the sentence.
235 # the text.
236 "polarity": 3.14, # DEPRECATED FIELD - This field is being deprecated in
237 # favor of score. Please refer to our documentation at
238 # https://cloud.google.com/natural-language/docs for more information.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400239 "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
240 # (positive sentiment).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800241 "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
242 # the absolute magnitude of sentiment regardless of score (positive or
243 # negative).
244 },
245 },
246 ],
247 }</pre>
248</div>
249
250<div class="method">
251 <code class="details" id="analyzeSyntax">analyzeSyntax(body, x__xgafv=None)</code>
252 <pre>Analyzes the syntax of the text and provides sentence boundaries and
253tokenization along with part of speech tags, dependency trees, and other
254properties.
255
256Args:
257 body: object, The request body. (required)
258 The object takes the form of:
259
260{ # The syntax analysis request message.
Thomas Coffee2f245372017-03-27 10:39:26 -0700261 "encodingType": "A String", # The encoding type used by the API to calculate offsets.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800262 "document": { # ################################################################ # # Input document.
263 #
264 # Represents the input to API methods.
265 "content": "A String", # The content of the input in string format.
266 "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
267 # returns an `INVALID_ARGUMENT` error.
268 "language": "A String", # The language of the document (if not specified, the language is
269 # automatically detected). Both ISO and BCP-47 language codes are
270 # accepted.<br>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400271 # [Language Support](/natural-language/docs/languages)
272 # lists currently supported languages for each API method.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800273 # If the language (either specified by the caller or automatically detected)
274 # is not supported by the called API method, an `INVALID_ARGUMENT` error
275 # is returned.
276 "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located.
277 # This URI must be of the form: gs://bucket_name/object_name. For more
278 # details, see https://cloud.google.com/storage/docs/reference-uris.
279 # NOTE: Cloud Storage object versioning is not supported.
280 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800281 }
282
283 x__xgafv: string, V1 error format.
284 Allowed values
285 1 - v1 error format
286 2 - v2 error format
287
288Returns:
289 An object of the form:
290
291 { # The syntax analysis response message.
292 "tokens": [ # Tokens, along with their syntactic information, in the input document.
293 { # Represents the smallest syntactic building block of the text.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400294 "text": { # Represents an output piece of text. # The token text.
295 "content": "A String", # The content of the output text.
296 "beginOffset": 42, # The API calculates the beginning offset of the content in the original
297 # document according to the EncodingType specified in the API request.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800298 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700299 "partOfSpeech": { # Represents part of speech information for a token. # Parts of speech tag for this token.
300 "case": "A String", # The grammatical case.
Thomas Coffee2f245372017-03-27 10:39:26 -0700301 "reciprocity": "A String", # The grammatical reciprocity.
302 "mood": "A String", # The grammatical mood.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700303 "form": "A String", # The grammatical form.
304 "gender": "A String", # The grammatical gender.
305 "number": "A String", # The grammatical number.
306 "person": "A String", # The grammatical person.
307 "tag": "A String", # The part of speech tag.
308 "tense": "A String", # The grammatical tense.
Thomas Coffee2f245372017-03-27 10:39:26 -0700309 "aspect": "A String", # The grammatical aspect.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700310 "proper": "A String", # The grammatical properness.
311 "voice": "A String", # The grammatical voice.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700312 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400313 "dependencyEdge": { # Represents dependency parse tree information for a token. # Dependency tree parse for this token.
314 "headTokenIndex": 42, # Represents the head of this token in the dependency tree.
315 # This is the index of the token which has an arc going to this token.
316 # The index is the position of the token in the array of tokens returned
317 # by the API method. If this token is a root token, then the
318 # `head_token_index` is its own index.
319 "label": "A String", # The parse label for the token.
Thomas Coffee2f245372017-03-27 10:39:26 -0700320 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400321 "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800322 },
323 ],
324 "language": "A String", # The language of the text, which will be the same as the language specified
325 # in the request or, if not specified, the automatically-detected language.
326 # See Document.language field for more details.
327 "sentences": [ # Sentences in the input document.
328 { # Represents a sentence in the input document.
329 "text": { # Represents an output piece of text. # The sentence text.
330 "content": "A String", # The content of the output text.
331 "beginOffset": 42, # The API calculates the beginning offset of the content in the original
332 # document according to the EncodingType specified in the API request.
333 },
334 "sentiment": { # Represents the feeling associated with the entire text or entities in # For calls to AnalyzeSentiment or if
335 # AnnotateTextRequest.Features.extract_document_sentiment is set to
336 # true, this field will contain the sentiment for the sentence.
337 # the text.
338 "polarity": 3.14, # DEPRECATED FIELD - This field is being deprecated in
339 # favor of score. Please refer to our documentation at
340 # https://cloud.google.com/natural-language/docs for more information.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400341 "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
342 # (positive sentiment).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800343 "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
344 # the absolute magnitude of sentiment regardless of score (positive or
345 # negative).
346 },
347 },
348 ],
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700349 }</pre>
350</div>
351
352<div class="method">
353 <code class="details" id="annotateText">annotateText(body, x__xgafv=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700354 <pre>A convenience method that provides all the features that analyzeSentiment,
355analyzeEntities, and analyzeSyntax provide in one call.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700356
357Args:
358 body: object, The request body. (required)
359 The object takes the form of:
360
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700361{ # The request message for the text annotation API, which can perform multiple
362 # analysis types (sentiment, entities, and syntax) in one call.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400363 "encodingType": "A String", # The encoding type used by the API to calculate offsets.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400364 "features": { # All available features for sentiment, syntax, and semantic analysis. # The enabled features.
365 # Setting each one to true will enable that specific analysis for the input.
366 "extractDocumentSentiment": True or False, # Extract document-level sentiment.
367 "extractEntities": True or False, # Extract entities.
368 "extractSyntax": True or False, # Extract syntax information.
369 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700370 "document": { # ################################################################ # # Input document.
371 #
372 # Represents the input to API methods.
373 "content": "A String", # The content of the input in string format.
374 "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
375 # returns an `INVALID_ARGUMENT` error.
376 "language": "A String", # The language of the document (if not specified, the language is
377 # automatically detected). Both ISO and BCP-47 language codes are
378 # accepted.<br>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400379 # [Language Support](/natural-language/docs/languages)
380 # lists currently supported languages for each API method.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700381 # If the language (either specified by the caller or automatically detected)
382 # is not supported by the called API method, an `INVALID_ARGUMENT` error
383 # is returned.
384 "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800385 # This URI must be of the form: gs://bucket_name/object_name. For more
386 # details, see https://cloud.google.com/storage/docs/reference-uris.
387 # NOTE: Cloud Storage object versioning is not supported.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700388 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700389 }
390
391 x__xgafv: string, V1 error format.
392 Allowed values
393 1 - v1 error format
394 2 - v2 error format
395
396Returns:
397 An object of the form:
398
399 { # The text annotations response message.
400 "tokens": [ # Tokens, along with their syntactic information, in the input document.
401 # Populated if the user enables
402 # AnnotateTextRequest.Features.extract_syntax.
403 { # Represents the smallest syntactic building block of the text.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400404 "text": { # Represents an output piece of text. # The token text.
405 "content": "A String", # The content of the output text.
406 "beginOffset": 42, # The API calculates the beginning offset of the content in the original
407 # document according to the EncodingType specified in the API request.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700408 },
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700409 "partOfSpeech": { # Represents part of speech information for a token. # Parts of speech tag for this token.
410 "case": "A String", # The grammatical case.
Thomas Coffee2f245372017-03-27 10:39:26 -0700411 "reciprocity": "A String", # The grammatical reciprocity.
412 "mood": "A String", # The grammatical mood.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700413 "form": "A String", # The grammatical form.
414 "gender": "A String", # The grammatical gender.
415 "number": "A String", # The grammatical number.
416 "person": "A String", # The grammatical person.
417 "tag": "A String", # The part of speech tag.
418 "tense": "A String", # The grammatical tense.
Thomas Coffee2f245372017-03-27 10:39:26 -0700419 "aspect": "A String", # The grammatical aspect.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700420 "proper": "A String", # The grammatical properness.
421 "voice": "A String", # The grammatical voice.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700422 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400423 "dependencyEdge": { # Represents dependency parse tree information for a token. # Dependency tree parse for this token.
424 "headTokenIndex": 42, # Represents the head of this token in the dependency tree.
425 # This is the index of the token which has an arc going to this token.
426 # The index is the position of the token in the array of tokens returned
427 # by the API method. If this token is a root token, then the
428 # `head_token_index` is its own index.
429 "label": "A String", # The parse label for the token.
Thomas Coffee2f245372017-03-27 10:39:26 -0700430 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400431 "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700432 },
433 ],
434 "entities": [ # Entities, along with their semantic information, in the input document.
435 # Populated if the user enables
436 # AnnotateTextRequest.Features.extract_entities.
437 { # Represents a phrase in the text that is a known entity, such as
438 # a person, an organization, or location. The API associates information, such
439 # as salience and mentions, with entities.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700440 "mentions": [ # The mentions of this entity in the input document. The API currently
441 # supports proper noun mentions.
442 { # Represents a mention for an entity in the text. Currently, proper noun
443 # mentions are supported.
444 "text": { # Represents an output piece of text. # The mention text.
445 "content": "A String", # The content of the output text.
446 "beginOffset": 42, # The API calculates the beginning offset of the content in the original
447 # document according to the EncodingType specified in the API request.
448 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800449 "type": "A String", # The type of the entity mention.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700450 },
451 ],
452 "salience": 3.14, # The salience score associated with the entity in the [0, 1.0] range.
453 #
454 # The salience score for an entity provides information about the
455 # importance or centrality of that entity to the entire document text.
456 # Scores closer to 0 are less salient, while scores closer to 1.0 are highly
457 # salient.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400458 "type": "A String", # The entity type.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700459 "name": "A String", # The representative name for the entity.
460 "metadata": { # Metadata associated with the entity.
461 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800462 # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
463 # available. The associated keys are "wikipedia_url" and "mid", respectively.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700464 "a_key": "A String",
465 },
466 },
467 ],
468 "documentSentiment": { # Represents the feeling associated with the entire text or entities in # The overall sentiment for the document. Populated if the user enables
469 # AnnotateTextRequest.Features.extract_document_sentiment.
470 # the text.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800471 "polarity": 3.14, # DEPRECATED FIELD - This field is being deprecated in
472 # favor of score. Please refer to our documentation at
473 # https://cloud.google.com/natural-language/docs for more information.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400474 "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
475 # (positive sentiment).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700476 "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800477 # the absolute magnitude of sentiment regardless of score (positive or
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700478 # negative).
479 },
480 "language": "A String", # The language of the text, which will be the same as the language specified
481 # in the request or, if not specified, the automatically-detected language.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700482 # See Document.language field for more details.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700483 "sentences": [ # Sentences in the input document. Populated if the user enables
484 # AnnotateTextRequest.Features.extract_syntax.
485 { # Represents a sentence in the input document.
486 "text": { # Represents an output piece of text. # The sentence text.
487 "content": "A String", # The content of the output text.
488 "beginOffset": 42, # The API calculates the beginning offset of the content in the original
489 # document according to the EncodingType specified in the API request.
490 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800491 "sentiment": { # Represents the feeling associated with the entire text or entities in # For calls to AnalyzeSentiment or if
492 # AnnotateTextRequest.Features.extract_document_sentiment is set to
493 # true, this field will contain the sentiment for the sentence.
494 # the text.
495 "polarity": 3.14, # DEPRECATED FIELD - This field is being deprecated in
496 # favor of score. Please refer to our documentation at
497 # https://cloud.google.com/natural-language/docs for more information.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400498 "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
499 # (positive sentiment).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800500 "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
501 # the absolute magnitude of sentiment regardless of score (positive or
502 # negative).
503 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700504 },
505 ],
506 }</pre>
507</div>
508
509</body></html>