| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [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_v1.html">Google Cloud Natural Language API</a> . <a href="language_v1.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 Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 79 | <p class="firstline">Finds named entities (currently proper names and common nouns) in the text</p> | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 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"> | 
|  | 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"> | 
|  | 87 | <code><a href="#annotateText">annotateText(body, x__xgafv=None)</a></code></p> | 
|  | 88 | <p class="firstline">A convenience method that provides all the features that analyzeSentiment,</p> | 
|  | 89 | <h3>Method Details</h3> | 
|  | 90 | <div class="method"> | 
|  | 91 | <code class="details" id="analyzeEntities">analyzeEntities(body, x__xgafv=None)</code> | 
| Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 92 | <pre>Finds named entities (currently proper names and common nouns) in the text | 
|  | 93 | along with entity types, salience, mentions for each entity, and | 
|  | 94 | other properties. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 95 |  | 
|  | 96 | Args: | 
|  | 97 | body: object, The request body. (required) | 
|  | 98 | The object takes the form of: | 
|  | 99 |  | 
|  | 100 | { # The entity analysis request message. | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 101 | "encodingType": "A String", # The encoding type used by the API to calculate offsets. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 102 | "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> | 
|  | 111 | # **Current Language Restrictions:** | 
|  | 112 | # | 
|  | 113 | #  * Only English, Spanish, and Japanese textual content are supported. | 
|  | 114 | # If the language (either specified by the caller or automatically detected) | 
|  | 115 | # is not supported by the called API method, an `INVALID_ARGUMENT` error | 
|  | 116 | # is returned. | 
|  | 117 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. | 
|  | 118 | # This URI must be of the form: gs://bucket_name/object_name. For more | 
|  | 119 | # details, see https://cloud.google.com/storage/docs/reference-uris. | 
|  | 120 | # NOTE: Cloud Storage object versioning is not supported. | 
|  | 121 | }, | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 122 | } | 
|  | 123 |  | 
|  | 124 | x__xgafv: string, V1 error format. | 
|  | 125 | Allowed values | 
|  | 126 | 1 - v1 error format | 
|  | 127 | 2 - v2 error format | 
|  | 128 |  | 
|  | 129 | Returns: | 
|  | 130 | An object of the form: | 
|  | 131 |  | 
|  | 132 | { # The entity analysis response message. | 
|  | 133 | "entities": [ # The recognized entities in the input document. | 
|  | 134 | { # Represents a phrase in the text that is a known entity, such as | 
|  | 135 | # a person, an organization, or location. The API associates information, such | 
|  | 136 | # as salience and mentions, with entities. | 
| Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 137 | "salience": 3.14, # The salience score associated with the entity in the [0, 1.0] range. | 
|  | 138 | # | 
|  | 139 | # The salience score for an entity provides information about the | 
|  | 140 | # importance or centrality of that entity to the entire document text. | 
|  | 141 | # Scores closer to 0 are less salient, while scores closer to 1.0 are highly | 
|  | 142 | # salient. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 143 | "mentions": [ # The mentions of this entity in the input document. The API currently | 
|  | 144 | # supports proper noun mentions. | 
|  | 145 | { # Represents a mention for an entity in the text. Currently, proper noun | 
|  | 146 | # mentions are supported. | 
|  | 147 | "text": { # Represents an output piece of text. # The mention text. | 
|  | 148 | "content": "A String", # The content of the output text. | 
|  | 149 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original | 
|  | 150 | # document according to the EncodingType specified in the API request. | 
|  | 151 | }, | 
|  | 152 | "type": "A String", # The type of the entity mention. | 
|  | 153 | }, | 
|  | 154 | ], | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 155 | "type": "A String", # The entity type. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 156 | "name": "A String", # The representative name for the entity. | 
|  | 157 | "metadata": { # Metadata associated with the entity. | 
|  | 158 | # | 
|  | 159 | # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if | 
|  | 160 | # available. The associated keys are "wikipedia_url" and "mid", respectively. | 
|  | 161 | "a_key": "A String", | 
|  | 162 | }, | 
|  | 163 | }, | 
|  | 164 | ], | 
|  | 165 | "language": "A String", # The language of the text, which will be the same as the language specified | 
|  | 166 | # in the request or, if not specified, the automatically-detected language. | 
|  | 167 | # See `Document.language` field for more details. | 
|  | 168 | }</pre> | 
|  | 169 | </div> | 
|  | 170 |  | 
|  | 171 | <div class="method"> | 
|  | 172 | <code class="details" id="analyzeSentiment">analyzeSentiment(body, x__xgafv=None)</code> | 
|  | 173 | <pre>Analyzes the sentiment of the provided text. | 
|  | 174 |  | 
|  | 175 | Args: | 
|  | 176 | body: object, The request body. (required) | 
|  | 177 | The object takes the form of: | 
|  | 178 |  | 
|  | 179 | { # The sentiment analysis request message. | 
| Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 180 | "encodingType": "A String", # The encoding type used by the API to calculate sentence offsets. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 181 | "document": { # ################################################################ # # Input document. Currently, `analyzeSentiment` only supports English text | 
|  | 182 | # (Document.language="EN"). | 
|  | 183 | # | 
|  | 184 | # Represents the input to API methods. | 
|  | 185 | "content": "A String", # The content of the input in string format. | 
|  | 186 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, | 
|  | 187 | # returns an `INVALID_ARGUMENT` error. | 
|  | 188 | "language": "A String", # The language of the document (if not specified, the language is | 
|  | 189 | # automatically detected). Both ISO and BCP-47 language codes are | 
|  | 190 | # accepted.<br> | 
|  | 191 | # **Current Language Restrictions:** | 
|  | 192 | # | 
|  | 193 | #  * Only English, Spanish, and Japanese textual content are supported. | 
|  | 194 | # If the language (either specified by the caller or automatically detected) | 
|  | 195 | # is not supported by the called API method, an `INVALID_ARGUMENT` error | 
|  | 196 | # is returned. | 
|  | 197 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. | 
|  | 198 | # This URI must be of the form: gs://bucket_name/object_name. For more | 
|  | 199 | # details, see https://cloud.google.com/storage/docs/reference-uris. | 
|  | 200 | # NOTE: Cloud Storage object versioning is not supported. | 
|  | 201 | }, | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [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. | 
|  | 215 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 | 
|  | 216 | # (positive sentiment). | 
|  | 217 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents | 
|  | 218 | # the absolute magnitude of sentiment regardless of score (positive or | 
|  | 219 | # negative). | 
|  | 220 | }, | 
|  | 221 | "language": "A String", # The language of the text, which will be the same as the language specified | 
|  | 222 | # in the request or, if not specified, the automatically-detected language. | 
|  | 223 | # See `Document.language` field for more details. | 
|  | 224 | "sentences": [ # The sentiment for all the sentences in the document. | 
|  | 225 | { # Represents a sentence in the input document. | 
|  | 226 | "text": { # Represents an output piece of text. # The sentence text. | 
|  | 227 | "content": "A String", # The content of the output text. | 
|  | 228 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original | 
|  | 229 | # document according to the EncodingType specified in the API request. | 
|  | 230 | }, | 
|  | 231 | "sentiment": { # Represents the feeling associated with the entire text or entities in # For calls to AnalyzeSentiment or if | 
|  | 232 | # AnnotateTextRequest.Features.extract_document_sentiment is set to | 
|  | 233 | # true, this field will contain the sentiment for the sentence. | 
|  | 234 | # the text. | 
|  | 235 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 | 
|  | 236 | # (positive sentiment). | 
|  | 237 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents | 
|  | 238 | # the absolute magnitude of sentiment regardless of score (positive or | 
|  | 239 | # negative). | 
|  | 240 | }, | 
|  | 241 | }, | 
|  | 242 | ], | 
|  | 243 | }</pre> | 
|  | 244 | </div> | 
|  | 245 |  | 
|  | 246 | <div class="method"> | 
|  | 247 | <code class="details" id="analyzeSyntax">analyzeSyntax(body, x__xgafv=None)</code> | 
|  | 248 | <pre>Analyzes the syntax of the text and provides sentence boundaries and | 
|  | 249 | tokenization along with part of speech tags, dependency trees, and other | 
|  | 250 | properties. | 
|  | 251 |  | 
|  | 252 | Args: | 
|  | 253 | body: object, The request body. (required) | 
|  | 254 | The object takes the form of: | 
|  | 255 |  | 
|  | 256 | { # The syntax analysis request message. | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 257 | "encodingType": "A String", # The encoding type used by the API to calculate offsets. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 258 | "document": { # ################################################################ # # Input document. | 
|  | 259 | # | 
|  | 260 | # Represents the input to API methods. | 
|  | 261 | "content": "A String", # The content of the input in string format. | 
|  | 262 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, | 
|  | 263 | # returns an `INVALID_ARGUMENT` error. | 
|  | 264 | "language": "A String", # The language of the document (if not specified, the language is | 
|  | 265 | # automatically detected). Both ISO and BCP-47 language codes are | 
|  | 266 | # accepted.<br> | 
|  | 267 | # **Current Language Restrictions:** | 
|  | 268 | # | 
|  | 269 | #  * Only English, Spanish, and Japanese textual content are supported. | 
|  | 270 | # If the language (either specified by the caller or automatically detected) | 
|  | 271 | # is not supported by the called API method, an `INVALID_ARGUMENT` error | 
|  | 272 | # is returned. | 
|  | 273 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. | 
|  | 274 | # This URI must be of the form: gs://bucket_name/object_name. For more | 
|  | 275 | # details, see https://cloud.google.com/storage/docs/reference-uris. | 
|  | 276 | # NOTE: Cloud Storage object versioning is not supported. | 
|  | 277 | }, | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 278 | } | 
|  | 279 |  | 
|  | 280 | x__xgafv: string, V1 error format. | 
|  | 281 | Allowed values | 
|  | 282 | 1 - v1 error format | 
|  | 283 | 2 - v2 error format | 
|  | 284 |  | 
|  | 285 | Returns: | 
|  | 286 | An object of the form: | 
|  | 287 |  | 
|  | 288 | { # The syntax analysis response message. | 
|  | 289 | "tokens": [ # Tokens, along with their syntactic information, in the input document. | 
|  | 290 | { # Represents the smallest syntactic building block of the text. | 
|  | 291 | "text": { # Represents an output piece of text. # The token text. | 
|  | 292 | "content": "A String", # The content of the output text. | 
|  | 293 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original | 
|  | 294 | # document according to the EncodingType specified in the API request. | 
|  | 295 | }, | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 296 | "partOfSpeech": { # Represents part of speech information for a token. Parts of speech # Parts of speech tag for this token. | 
|  | 297 | # are as defined in | 
|  | 298 | # http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf | 
|  | 299 | "case": "A String", # The grammatical case. | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 300 | "aspect": "A String", # The grammatical aspect. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 301 | "form": "A String", # The grammatical form. | 
|  | 302 | "gender": "A String", # The grammatical gender. | 
|  | 303 | "number": "A String", # The grammatical number. | 
|  | 304 | "person": "A String", # The grammatical person. | 
|  | 305 | "tag": "A String", # The part of speech tag. | 
|  | 306 | "tense": "A String", # The grammatical tense. | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 307 | "reciprocity": "A String", # The grammatical reciprocity. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 308 | "proper": "A String", # The grammatical properness. | 
|  | 309 | "voice": "A String", # The grammatical voice. | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 310 | "mood": "A String", # The grammatical mood. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 311 | }, | 
| Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 312 | "dependencyEdge": { # Represents dependency parse tree information for a token. (For more # Dependency tree parse for this token. | 
|  | 313 | # information on dependency labels, see | 
|  | 314 | # http://www.aclweb.org/anthology/P13-2017 | 
|  | 315 | "headTokenIndex": 42, # Represents the head of this token in the dependency tree. | 
|  | 316 | # This is the index of the token which has an arc going to this token. | 
|  | 317 | # The index is the position of the token in the array of tokens returned | 
|  | 318 | # by the API method. If this token is a root token, then the | 
|  | 319 | # `head_token_index` is its own index. | 
|  | 320 | "label": "A String", # The parse label for the token. | 
|  | 321 | }, | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 322 | "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. | 
|  | 323 | }, | 
|  | 324 | ], | 
|  | 325 | "language": "A String", # The language of the text, which will be the same as the language specified | 
|  | 326 | # in the request or, if not specified, the automatically-detected language. | 
|  | 327 | # See `Document.language` field for more details. | 
|  | 328 | "sentences": [ # Sentences in the input document. | 
|  | 329 | { # Represents a sentence in the input document. | 
|  | 330 | "text": { # Represents an output piece of text. # The sentence text. | 
|  | 331 | "content": "A String", # The content of the output text. | 
|  | 332 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original | 
|  | 333 | # document according to the EncodingType specified in the API request. | 
|  | 334 | }, | 
|  | 335 | "sentiment": { # Represents the feeling associated with the entire text or entities in # For calls to AnalyzeSentiment or if | 
|  | 336 | # AnnotateTextRequest.Features.extract_document_sentiment is set to | 
|  | 337 | # true, this field will contain the sentiment for the sentence. | 
|  | 338 | # the text. | 
|  | 339 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 | 
|  | 340 | # (positive sentiment). | 
|  | 341 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents | 
|  | 342 | # the absolute magnitude of sentiment regardless of score (positive or | 
|  | 343 | # negative). | 
|  | 344 | }, | 
|  | 345 | }, | 
|  | 346 | ], | 
|  | 347 | }</pre> | 
|  | 348 | </div> | 
|  | 349 |  | 
|  | 350 | <div class="method"> | 
|  | 351 | <code class="details" id="annotateText">annotateText(body, x__xgafv=None)</code> | 
|  | 352 | <pre>A convenience method that provides all the features that analyzeSentiment, | 
|  | 353 | analyzeEntities, and analyzeSyntax provide in one call. | 
|  | 354 |  | 
|  | 355 | Args: | 
|  | 356 | body: object, The request body. (required) | 
|  | 357 | The object takes the form of: | 
|  | 358 |  | 
|  | 359 | { # The request message for the text annotation API, which can perform multiple | 
|  | 360 | # analysis types (sentiment, entities, and syntax) in one call. | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 361 | "encodingType": "A String", # The encoding type used by the API to calculate offsets. | 
| Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 362 | "features": { # All available features for sentiment, syntax, and semantic analysis. # The enabled features. | 
|  | 363 | # Setting each one to true will enable that specific analysis for the input. | 
|  | 364 | "extractDocumentSentiment": True or False, # Extract document-level sentiment. | 
|  | 365 | "extractEntities": True or False, # Extract entities. | 
|  | 366 | "extractSyntax": True or False, # Extract syntax information. | 
|  | 367 | }, | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 368 | "document": { # ################################################################ # # Input document. | 
|  | 369 | # | 
|  | 370 | # Represents the input to API methods. | 
|  | 371 | "content": "A String", # The content of the input in string format. | 
|  | 372 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, | 
|  | 373 | # returns an `INVALID_ARGUMENT` error. | 
|  | 374 | "language": "A String", # The language of the document (if not specified, the language is | 
|  | 375 | # automatically detected). Both ISO and BCP-47 language codes are | 
|  | 376 | # accepted.<br> | 
|  | 377 | # **Current Language Restrictions:** | 
|  | 378 | # | 
|  | 379 | #  * Only English, Spanish, and Japanese textual content are supported. | 
|  | 380 | # If the language (either specified by the caller or automatically detected) | 
|  | 381 | # is not supported by the called API method, an `INVALID_ARGUMENT` error | 
|  | 382 | # is returned. | 
|  | 383 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. | 
|  | 384 | # This URI must be of the form: gs://bucket_name/object_name. For more | 
|  | 385 | # details, see https://cloud.google.com/storage/docs/reference-uris. | 
|  | 386 | # NOTE: Cloud Storage object versioning is not supported. | 
|  | 387 | }, | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 388 | } | 
|  | 389 |  | 
|  | 390 | x__xgafv: string, V1 error format. | 
|  | 391 | Allowed values | 
|  | 392 | 1 - v1 error format | 
|  | 393 | 2 - v2 error format | 
|  | 394 |  | 
|  | 395 | Returns: | 
|  | 396 | An object of the form: | 
|  | 397 |  | 
|  | 398 | { # The text annotations response message. | 
|  | 399 | "tokens": [ # Tokens, along with their syntactic information, in the input document. | 
|  | 400 | # Populated if the user enables | 
|  | 401 | # AnnotateTextRequest.Features.extract_syntax. | 
|  | 402 | { # Represents the smallest syntactic building block of the text. | 
|  | 403 | "text": { # Represents an output piece of text. # The token text. | 
|  | 404 | "content": "A String", # The content of the output text. | 
|  | 405 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original | 
|  | 406 | # document according to the EncodingType specified in the API request. | 
|  | 407 | }, | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 408 | "partOfSpeech": { # Represents part of speech information for a token. Parts of speech # Parts of speech tag for this token. | 
|  | 409 | # are as defined in | 
|  | 410 | # http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf | 
|  | 411 | "case": "A String", # The grammatical case. | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 412 | "aspect": "A String", # The grammatical aspect. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 413 | "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. | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 419 | "reciprocity": "A String", # The grammatical reciprocity. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 420 | "proper": "A String", # The grammatical properness. | 
|  | 421 | "voice": "A String", # The grammatical voice. | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 422 | "mood": "A String", # The grammatical mood. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 423 | }, | 
| Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 424 | "dependencyEdge": { # Represents dependency parse tree information for a token. (For more # Dependency tree parse for this token. | 
|  | 425 | # information on dependency labels, see | 
|  | 426 | # http://www.aclweb.org/anthology/P13-2017 | 
|  | 427 | "headTokenIndex": 42, # Represents the head of this token in the dependency tree. | 
|  | 428 | # This is the index of the token which has an arc going to this token. | 
|  | 429 | # The index is the position of the token in the array of tokens returned | 
|  | 430 | # by the API method. If this token is a root token, then the | 
|  | 431 | # `head_token_index` is its own index. | 
|  | 432 | "label": "A String", # The parse label for the token. | 
|  | 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. | 
|  | 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. | 
| Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 443 | "salience": 3.14, # The salience score associated with the entity in the [0, 1.0] range. | 
|  | 444 | # | 
|  | 445 | # The salience score for an entity provides information about the | 
|  | 446 | # importance or centrality of that entity to the entire document text. | 
|  | 447 | # Scores closer to 0 are less salient, while scores closer to 1.0 are highly | 
|  | 448 | # salient. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 449 | "mentions": [ # The mentions of this entity in the input document. The API currently | 
|  | 450 | # supports proper noun mentions. | 
|  | 451 | { # Represents a mention for an entity in the text. Currently, proper noun | 
|  | 452 | # mentions are supported. | 
|  | 453 | "text": { # Represents an output piece of text. # The mention text. | 
|  | 454 | "content": "A String", # The content of the output text. | 
|  | 455 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original | 
|  | 456 | # document according to the EncodingType specified in the API request. | 
|  | 457 | }, | 
|  | 458 | "type": "A String", # The type of the entity mention. | 
|  | 459 | }, | 
|  | 460 | ], | 
| Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 461 | "type": "A String", # The entity type. | 
| Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 462 | "name": "A String", # The representative name for the entity. | 
|  | 463 | "metadata": { # Metadata associated with the entity. | 
|  | 464 | # | 
|  | 465 | # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if | 
|  | 466 | # available. The associated keys are "wikipedia_url" and "mid", respectively. | 
|  | 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. | 
|  | 474 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 | 
|  | 475 | # (positive sentiment). | 
|  | 476 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents | 
|  | 477 | # the absolute magnitude of sentiment regardless of score (positive or | 
|  | 478 | # 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. | 
|  | 482 | # See `Document.language` field for more details. | 
|  | 483 | "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 | }, | 
|  | 491 | "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 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 | 
|  | 496 | # (positive sentiment). | 
|  | 497 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents | 
|  | 498 | # the absolute magnitude of sentiment regardless of score (positive or | 
|  | 499 | # negative). | 
|  | 500 | }, | 
|  | 501 | }, | 
|  | 502 | ], | 
|  | 503 | }</pre> | 
|  | 504 | </div> | 
|  | 505 |  | 
|  | 506 | </body></html> |