Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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> |
| 79 | <p class="firstline">Finds named entities (currently finds proper names) in the text,</p> |
| 80 | <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 Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 84 | <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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 87 | <code><a href="#annotateText">annotateText(body, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 88 | <p class="firstline">A convenience method that provides all the features that analyzeSentiment,</p> |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 89 | <h3>Method Details</h3> |
| 90 | <div class="method"> |
| 91 | <code class="details" id="analyzeEntities">analyzeEntities(body, x__xgafv=None)</code> |
| 92 | <pre>Finds named entities (currently finds proper names) in the text, |
| 93 | entity types, salience, mentions for each entity, and other properties. |
| 94 | |
| 95 | Args: |
| 96 | body: object, The request body. (required) |
| 97 | The object takes the form of: |
| 98 | |
| 99 | { # The entity analysis request message. |
| 100 | "document": { # ################################################################ # # Input document. |
| 101 | # |
| 102 | # Represents the input to API methods. |
| 103 | "content": "A String", # The content of the input in string format. |
| 104 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, |
| 105 | # returns an `INVALID_ARGUMENT` error. |
| 106 | "language": "A String", # The language of the document (if not specified, the language is |
| 107 | # automatically detected). Both ISO and BCP-47 language codes are |
| 108 | # accepted.<br> |
| 109 | # **Current Language Restrictions:** |
| 110 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 111 | # * Only English, Spanish, and Japanese textual content are supported. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 112 | # If the language (either specified by the caller or automatically detected) |
| 113 | # is not supported by the called API method, an `INVALID_ARGUMENT` error |
| 114 | # is returned. |
| 115 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 116 | # This URI must be of the form: gs://bucket_name/object_name. For more |
| 117 | # details, see https://cloud.google.com/storage/docs/reference-uris. |
| 118 | # NOTE: Cloud Storage object versioning is not supported. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 119 | }, |
| 120 | "encodingType": "A String", # The encoding type used by the API to calculate offsets. |
| 121 | } |
| 122 | |
| 123 | x__xgafv: string, V1 error format. |
| 124 | Allowed values |
| 125 | 1 - v1 error format |
| 126 | 2 - v2 error format |
| 127 | |
| 128 | Returns: |
| 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. |
| 136 | "type": "A String", # The entity type. |
| 137 | "mentions": [ # The mentions of this entity in the input document. The API currently |
| 138 | # supports proper noun mentions. |
| 139 | { # Represents a mention for an entity in the text. Currently, proper noun |
| 140 | # mentions are supported. |
| 141 | "text": { # Represents an output piece of text. # The mention text. |
| 142 | "content": "A String", # The content of the output text. |
| 143 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original |
| 144 | # document according to the EncodingType specified in the API request. |
| 145 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 146 | "type": "A String", # The type of the entity mention. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 147 | }, |
| 148 | ], |
| 149 | "salience": 3.14, # The salience score associated with the entity in the [0, 1.0] range. |
| 150 | # |
| 151 | # The salience score for an entity provides information about the |
| 152 | # importance or centrality of that entity to the entire document text. |
| 153 | # Scores closer to 0 are less salient, while scores closer to 1.0 are highly |
| 154 | # salient. |
| 155 | "name": "A String", # The representative name for the entity. |
| 156 | "metadata": { # Metadata associated with the entity. |
| 157 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 158 | # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if |
| 159 | # available. The associated keys are "wikipedia_url" and "mid", respectively. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 160 | "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 Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 166 | # See Document.language field for more details. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 167 | }</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 | |
| 174 | Args: |
| 175 | body: object, The request body. (required) |
| 176 | The object takes the form of: |
| 177 | |
| 178 | { # The sentiment analysis request message. |
| 179 | "document": { # ################################################################ # # Input document. Currently, `analyzeSentiment` only supports English text |
| 180 | # (Document.language="EN"). |
| 181 | # |
| 182 | # Represents the input to API methods. |
| 183 | "content": "A String", # The content of the input in string format. |
| 184 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, |
| 185 | # returns an `INVALID_ARGUMENT` error. |
| 186 | "language": "A String", # The language of the document (if not specified, the language is |
| 187 | # automatically detected). Both ISO and BCP-47 language codes are |
| 188 | # accepted.<br> |
| 189 | # **Current Language Restrictions:** |
| 190 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 191 | # * Only English, Spanish, and Japanese textual content are supported. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 192 | # 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 Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 196 | # 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 Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 199 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 200 | "encodingType": "A String", # The encoding type used by the API to calculate sentence offsets for the |
| 201 | # sentence sentiment. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 202 | } |
| 203 | |
| 204 | x__xgafv: string, V1 error format. |
| 205 | Allowed values |
| 206 | 1 - v1 error format |
| 207 | 2 - v2 error format |
| 208 | |
| 209 | Returns: |
| 210 | An object of the form: |
| 211 | |
| 212 | { # The sentiment analysis response message. |
| 213 | "documentSentiment": { # Represents the feeling associated with the entire text or entities in # The overall sentiment of the input document. |
| 214 | # the text. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 215 | "polarity": 3.14, # DEPRECATED FIELD - This field is being deprecated in |
| 216 | # favor of score. Please refer to our documentation at |
| 217 | # https://cloud.google.com/natural-language/docs for more information. |
| 218 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 |
| 219 | # (positive sentiment). |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 220 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 221 | # the absolute magnitude of sentiment regardless of score (positive or |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 222 | # negative). |
| 223 | }, |
| 224 | "language": "A String", # The language of the text, which will be the same as the language specified |
| 225 | # in the request or, if not specified, the automatically-detected language. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 226 | "sentences": [ # The sentiment for all the sentences in the document. |
| 227 | { # Represents a sentence in the input document. |
| 228 | "text": { # Represents an output piece of text. # The sentence text. |
| 229 | "content": "A String", # The content of the output text. |
| 230 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original |
| 231 | # document according to the EncodingType specified in the API request. |
| 232 | }, |
| 233 | "sentiment": { # Represents the feeling associated with the entire text or entities in # For calls to AnalyzeSentiment or if |
| 234 | # AnnotateTextRequest.Features.extract_document_sentiment is set to |
| 235 | # true, this field will contain the sentiment for the sentence. |
| 236 | # the text. |
| 237 | "polarity": 3.14, # DEPRECATED FIELD - This field is being deprecated in |
| 238 | # favor of score. Please refer to our documentation at |
| 239 | # https://cloud.google.com/natural-language/docs for more information. |
| 240 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 |
| 241 | # (positive sentiment). |
| 242 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents |
| 243 | # the absolute magnitude of sentiment regardless of score (positive or |
| 244 | # negative). |
| 245 | }, |
| 246 | }, |
| 247 | ], |
| 248 | }</pre> |
| 249 | </div> |
| 250 | |
| 251 | <div class="method"> |
| 252 | <code class="details" id="analyzeSyntax">analyzeSyntax(body, x__xgafv=None)</code> |
| 253 | <pre>Analyzes the syntax of the text and provides sentence boundaries and |
| 254 | tokenization along with part of speech tags, dependency trees, and other |
| 255 | properties. |
| 256 | |
| 257 | Args: |
| 258 | body: object, The request body. (required) |
| 259 | The object takes the form of: |
| 260 | |
| 261 | { # The syntax analysis request message. |
| 262 | "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> |
| 271 | # **Current Language Restrictions:** |
| 272 | # |
| 273 | # * Only English, Spanish, and Japanese textual content are supported. |
| 274 | # If the language (either specified by the caller or automatically detected) |
| 275 | # is not supported by the called API method, an `INVALID_ARGUMENT` error |
| 276 | # is returned. |
| 277 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. |
| 278 | # This URI must be of the form: gs://bucket_name/object_name. For more |
| 279 | # details, see https://cloud.google.com/storage/docs/reference-uris. |
| 280 | # NOTE: Cloud Storage object versioning is not supported. |
| 281 | }, |
| 282 | "encodingType": "A String", # The encoding type used by the API to calculate offsets. |
| 283 | } |
| 284 | |
| 285 | x__xgafv: string, V1 error format. |
| 286 | Allowed values |
| 287 | 1 - v1 error format |
| 288 | 2 - v2 error format |
| 289 | |
| 290 | Returns: |
| 291 | An object of the form: |
| 292 | |
| 293 | { # The syntax analysis response message. |
| 294 | "tokens": [ # Tokens, along with their syntactic information, in the input document. |
| 295 | { # Represents the smallest syntactic building block of the text. |
| 296 | "text": { # Represents an output piece of text. # The token text. |
| 297 | "content": "A String", # The content of the output text. |
| 298 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original |
| 299 | # document according to the EncodingType specified in the API request. |
| 300 | }, |
| 301 | "dependencyEdge": { # Represents dependency parse tree information for a token. # Dependency tree parse for this token. |
| 302 | "headTokenIndex": 42, # Represents the head of this token in the dependency tree. |
| 303 | # This is the index of the token which has an arc going to this token. |
| 304 | # The index is the position of the token in the array of tokens returned |
| 305 | # by the API method. If this token is a root token, then the |
| 306 | # `head_token_index` is its own index. |
| 307 | "label": "A String", # The parse label for the token. |
| 308 | }, |
| 309 | "partOfSpeech": { # Represents part of speech information for a token. # Parts of speech tag for this token. |
| 310 | "case": "A String", # The grammatical case. |
| 311 | "reciprocity": "A String", # The grammatical reciprocity. |
| 312 | "mood": "A String", # The grammatical mood. |
| 313 | "form": "A String", # The grammatical form. |
| 314 | "gender": "A String", # The grammatical gender. |
| 315 | "number": "A String", # The grammatical number. |
| 316 | "person": "A String", # The grammatical person. |
| 317 | "tag": "A String", # The part of speech tag. |
| 318 | "tense": "A String", # The grammatical tense. |
| 319 | "aspect": "A String", # The grammatical aspect. |
| 320 | "proper": "A String", # The grammatical properness. |
| 321 | "voice": "A String", # The grammatical voice. |
| 322 | }, |
| 323 | "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. |
| 324 | }, |
| 325 | ], |
| 326 | "language": "A String", # The language of the text, which will be the same as the language specified |
| 327 | # in the request or, if not specified, the automatically-detected language. |
| 328 | # See Document.language field for more details. |
| 329 | "sentences": [ # Sentences in the input document. |
| 330 | { # Represents a sentence in the input document. |
| 331 | "text": { # Represents an output piece of text. # The sentence text. |
| 332 | "content": "A String", # The content of the output text. |
| 333 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original |
| 334 | # document according to the EncodingType specified in the API request. |
| 335 | }, |
| 336 | "sentiment": { # Represents the feeling associated with the entire text or entities in # For calls to AnalyzeSentiment or if |
| 337 | # AnnotateTextRequest.Features.extract_document_sentiment is set to |
| 338 | # true, this field will contain the sentiment for the sentence. |
| 339 | # the text. |
| 340 | "polarity": 3.14, # DEPRECATED FIELD - This field is being deprecated in |
| 341 | # favor of score. Please refer to our documentation at |
| 342 | # https://cloud.google.com/natural-language/docs for more information. |
| 343 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 |
| 344 | # (positive sentiment). |
| 345 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents |
| 346 | # the absolute magnitude of sentiment regardless of score (positive or |
| 347 | # negative). |
| 348 | }, |
| 349 | }, |
| 350 | ], |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 351 | }</pre> |
| 352 | </div> |
| 353 | |
| 354 | <div class="method"> |
| 355 | <code class="details" id="annotateText">annotateText(body, x__xgafv=None)</code> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 356 | <pre>A convenience method that provides all the features that analyzeSentiment, |
| 357 | analyzeEntities, and analyzeSyntax provide in one call. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 358 | |
| 359 | Args: |
| 360 | body: object, The request body. (required) |
| 361 | The object takes the form of: |
| 362 | |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 363 | { # The request message for the text annotation API, which can perform multiple |
| 364 | # analysis types (sentiment, entities, and syntax) in one call. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 365 | "document": { # ################################################################ # # Input document. |
| 366 | # |
| 367 | # Represents the input to API methods. |
| 368 | "content": "A String", # The content of the input in string format. |
| 369 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, |
| 370 | # returns an `INVALID_ARGUMENT` error. |
| 371 | "language": "A String", # The language of the document (if not specified, the language is |
| 372 | # automatically detected). Both ISO and BCP-47 language codes are |
| 373 | # accepted.<br> |
| 374 | # **Current Language Restrictions:** |
| 375 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 376 | # * Only English, Spanish, and Japanese textual content are supported. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 377 | # If the language (either specified by the caller or automatically detected) |
| 378 | # is not supported by the called API method, an `INVALID_ARGUMENT` error |
| 379 | # is returned. |
| 380 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 381 | # This URI must be of the form: gs://bucket_name/object_name. For more |
| 382 | # details, see https://cloud.google.com/storage/docs/reference-uris. |
| 383 | # NOTE: Cloud Storage object versioning is not supported. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 384 | }, |
| 385 | "encodingType": "A String", # The encoding type used by the API to calculate offsets. |
| 386 | "features": { # All available features for sentiment, syntax, and semantic analysis. # The enabled features. |
| 387 | # Setting each one to true will enable that specific analysis for the input. |
| 388 | "extractSyntax": True or False, # Extract syntax information. |
| 389 | "extractEntities": True or False, # Extract entities. |
| 390 | "extractDocumentSentiment": True or False, # Extract document-level sentiment. |
| 391 | }, |
| 392 | } |
| 393 | |
| 394 | x__xgafv: string, V1 error format. |
| 395 | Allowed values |
| 396 | 1 - v1 error format |
| 397 | 2 - v2 error format |
| 398 | |
| 399 | Returns: |
| 400 | An object of the form: |
| 401 | |
| 402 | { # The text annotations response message. |
| 403 | "tokens": [ # Tokens, along with their syntactic information, in the input document. |
| 404 | # Populated if the user enables |
| 405 | # AnnotateTextRequest.Features.extract_syntax. |
| 406 | { # Represents the smallest syntactic building block of the text. |
| 407 | "text": { # Represents an output piece of text. # The token text. |
| 408 | "content": "A String", # The content of the output text. |
| 409 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original |
| 410 | # document according to the EncodingType specified in the API request. |
| 411 | }, |
| 412 | "dependencyEdge": { # Represents dependency parse tree information for a token. # Dependency tree parse for this token. |
| 413 | "headTokenIndex": 42, # Represents the head of this token in the dependency tree. |
| 414 | # This is the index of the token which has an arc going to this token. |
| 415 | # The index is the position of the token in the array of tokens returned |
| 416 | # by the API method. If this token is a root token, then the |
| 417 | # `head_token_index` is its own index. |
| 418 | "label": "A String", # The parse label for the token. |
| 419 | }, |
| 420 | "partOfSpeech": { # Represents part of speech information for a token. # Parts of speech tag for this token. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 421 | "case": "A String", # The grammatical case. |
| 422 | "reciprocity": "A String", # The grammatical reciprocity. |
| 423 | "mood": "A String", # The grammatical mood. |
| 424 | "form": "A String", # The grammatical form. |
| 425 | "gender": "A String", # The grammatical gender. |
| 426 | "number": "A String", # The grammatical number. |
| 427 | "person": "A String", # The grammatical person. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 428 | "tag": "A String", # The part of speech tag. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 429 | "tense": "A String", # The grammatical tense. |
| 430 | "aspect": "A String", # The grammatical aspect. |
| 431 | "proper": "A String", # The grammatical properness. |
| 432 | "voice": "A String", # The grammatical voice. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 433 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 434 | "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 435 | }, |
| 436 | ], |
| 437 | "entities": [ # Entities, along with their semantic information, in the input document. |
| 438 | # Populated if the user enables |
| 439 | # AnnotateTextRequest.Features.extract_entities. |
| 440 | { # Represents a phrase in the text that is a known entity, such as |
| 441 | # a person, an organization, or location. The API associates information, such |
| 442 | # as salience and mentions, with entities. |
| 443 | "type": "A String", # The entity type. |
| 444 | "mentions": [ # The mentions of this entity in the input document. The API currently |
| 445 | # supports proper noun mentions. |
| 446 | { # Represents a mention for an entity in the text. Currently, proper noun |
| 447 | # mentions are supported. |
| 448 | "text": { # Represents an output piece of text. # The mention text. |
| 449 | "content": "A String", # The content of the output text. |
| 450 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original |
| 451 | # document according to the EncodingType specified in the API request. |
| 452 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 453 | "type": "A String", # The type of the entity mention. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 454 | }, |
| 455 | ], |
| 456 | "salience": 3.14, # The salience score associated with the entity in the [0, 1.0] range. |
| 457 | # |
| 458 | # The salience score for an entity provides information about the |
| 459 | # importance or centrality of that entity to the entire document text. |
| 460 | # Scores closer to 0 are less salient, while scores closer to 1.0 are highly |
| 461 | # salient. |
| 462 | "name": "A String", # The representative name for the entity. |
| 463 | "metadata": { # Metadata associated with the entity. |
| 464 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 465 | # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if |
| 466 | # available. The associated keys are "wikipedia_url" and "mid", respectively. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 467 | "a_key": "A String", |
| 468 | }, |
| 469 | }, |
| 470 | ], |
| 471 | "documentSentiment": { # Represents the feeling associated with the entire text or entities in # The overall sentiment for the document. Populated if the user enables |
| 472 | # AnnotateTextRequest.Features.extract_document_sentiment. |
| 473 | # the text. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 474 | "polarity": 3.14, # DEPRECATED FIELD - This field is being deprecated in |
| 475 | # favor of score. Please refer to our documentation at |
| 476 | # https://cloud.google.com/natural-language/docs for more information. |
| 477 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 |
| 478 | # (positive sentiment). |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 479 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 480 | # the absolute magnitude of sentiment regardless of score (positive or |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 481 | # negative). |
| 482 | }, |
| 483 | "language": "A String", # The language of the text, which will be the same as the language specified |
| 484 | # in the request or, if not specified, the automatically-detected language. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 485 | # See Document.language field for more details. |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 486 | "sentences": [ # Sentences in the input document. Populated if the user enables |
| 487 | # AnnotateTextRequest.Features.extract_syntax. |
| 488 | { # Represents a sentence in the input document. |
| 489 | "text": { # Represents an output piece of text. # The sentence text. |
| 490 | "content": "A String", # The content of the output text. |
| 491 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original |
| 492 | # document according to the EncodingType specified in the API request. |
| 493 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame^] | 494 | "sentiment": { # Represents the feeling associated with the entire text or entities in # For calls to AnalyzeSentiment or if |
| 495 | # AnnotateTextRequest.Features.extract_document_sentiment is set to |
| 496 | # true, this field will contain the sentiment for the sentence. |
| 497 | # the text. |
| 498 | "polarity": 3.14, # DEPRECATED FIELD - This field is being deprecated in |
| 499 | # favor of score. Please refer to our documentation at |
| 500 | # https://cloud.google.com/natural-language/docs for more information. |
| 501 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 |
| 502 | # (positive sentiment). |
| 503 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents |
| 504 | # the absolute magnitude of sentiment regardless of score (positive or |
| 505 | # negative). |
| 506 | }, |
Jon Wayne Parrott | 7d5badb | 2016-08-16 12:44:29 -0700 | [diff] [blame] | 507 | }, |
| 508 | ], |
| 509 | }</pre> |
| 510 | </div> |
| 511 | |
| 512 | </body></html> |