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 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="language_v1.html">Cloud Natural Language API</a> . <a href="language_v1.documents.html">documents</a></h1> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#analyzeEntities">analyzeEntities(body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 79 | <p class="firstline">Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.</p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#analyzeEntitySentiment">analyzeEntitySentiment(body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 82 | <p class="firstline">Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 83 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 84 | <code><a href="#analyzeSentiment">analyzeSentiment(body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 85 | <p class="firstline">Analyzes the sentiment of the provided text.</p> |
| 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 87 | <code><a href="#analyzeSyntax">analyzeSyntax(body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 88 | <p class="firstline">Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.</p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#annotateText">annotateText(body=None, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 91 | <p class="firstline">A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#classifyText">classifyText(body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Classifies a document into categories.</p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 95 | <p class="toc_element"> |
| 96 | <code><a href="#close">close()</a></code></p> |
| 97 | <p class="firstline">Close httplib2 connections.</p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 100 | <code class="details" id="analyzeEntities">analyzeEntities(body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 101 | <pre>Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 102 | |
| 103 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 104 | body: object, The request body. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 105 | The object takes the form of: |
| 106 | |
| 107 | { # The entity analysis request message. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 108 | "encodingType": "A String", # The encoding type used by the API to calculate offsets. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 109 | "document": { # ################################################################ # Represents the input to API methods. # Required. Input document. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 110 | "language": "A String", # The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. [Language Support](https://cloud.google.com/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 111 | "content": "A String", # The content of the input in string format. Cloud audit logging exempt since it is based on user data. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 112 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 113 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 114 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | x__xgafv: string, V1 error format. |
| 118 | Allowed values |
| 119 | 1 - v1 error format |
| 120 | 2 - v2 error format |
| 121 | |
| 122 | Returns: |
| 123 | An object of the form: |
| 124 | |
| 125 | { # The entity analysis response message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 126 | "entities": [ # The recognized entities in the input document. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 127 | { # Represents a phrase in the text that is a known entity, such as a person, an organization, or location. The API associates information, such as salience and mentions, with entities. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 128 | "name": "A String", # The representative name for the entity. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 129 | "salience": 3.14, # The salience score associated with the entity in the [0, 1.0] range. The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient. |
| 130 | "type": "A String", # The entity type. |
| 131 | "sentiment": { # Represents the feeling associated with the entire text or entities in the text. # For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document. |
| 132 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
| 133 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 134 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 135 | "mentions": [ # The mentions of this entity in the input document. The API currently supports proper noun mentions. |
| 136 | { # Represents a mention for an entity in the text. Currently, proper noun mentions are supported. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 137 | "text": { # Represents an output piece of text. # The mention text. |
| 138 | "content": "A String", # The content of the output text. |
| 139 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. |
| 140 | }, |
| 141 | "type": "A String", # The type of the entity mention. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 142 | "sentiment": { # Represents the feeling associated with the entire text or entities in the text. # For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document. |
| 143 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
| 144 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 145 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 146 | }, |
| 147 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 148 | "metadata": { # Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below. |
| 149 | "a_key": "A String", |
| 150 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 151 | }, |
| 152 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 153 | "language": "A String", # The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 154 | }</pre> |
| 155 | </div> |
| 156 | |
| 157 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 158 | <code class="details" id="analyzeEntitySentiment">analyzeEntitySentiment(body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 159 | <pre>Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 160 | |
| 161 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 162 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 163 | The object takes the form of: |
| 164 | |
| 165 | { # The entity-level sentiment analysis request message. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 166 | "encodingType": "A String", # The encoding type used by the API to calculate offsets. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 167 | "document": { # ################################################################ # Represents the input to API methods. # Required. Input document. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 168 | "language": "A String", # The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. [Language Support](https://cloud.google.com/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 169 | "content": "A String", # The content of the input in string format. Cloud audit logging exempt since it is based on user data. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 170 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 171 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 172 | }, |
| 173 | } |
| 174 | |
| 175 | x__xgafv: string, V1 error format. |
| 176 | Allowed values |
| 177 | 1 - v1 error format |
| 178 | 2 - v2 error format |
| 179 | |
| 180 | Returns: |
| 181 | An object of the form: |
| 182 | |
| 183 | { # The entity-level sentiment analysis response message. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 184 | "language": "A String", # The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 185 | "entities": [ # The recognized entities in the input document with associated sentiments. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 186 | { # Represents a phrase in the text that is a known entity, such as a person, an organization, or location. The API associates information, such as salience and mentions, with entities. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 187 | "name": "A String", # The representative name for the entity. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 188 | "salience": 3.14, # The salience score associated with the entity in the [0, 1.0] range. The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient. |
| 189 | "type": "A String", # The entity type. |
| 190 | "sentiment": { # Represents the feeling associated with the entire text or entities in the text. # For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document. |
| 191 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
| 192 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 193 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 194 | "mentions": [ # The mentions of this entity in the input document. The API currently supports proper noun mentions. |
| 195 | { # Represents a mention for an entity in the text. Currently, proper noun mentions are supported. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 196 | "text": { # Represents an output piece of text. # The mention text. |
| 197 | "content": "A String", # The content of the output text. |
| 198 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. |
| 199 | }, |
| 200 | "type": "A String", # The type of the entity mention. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 201 | "sentiment": { # Represents the feeling associated with the entire text or entities in the text. # For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document. |
| 202 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
| 203 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 204 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 205 | }, |
| 206 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 207 | "metadata": { # Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below. |
| 208 | "a_key": "A String", |
| 209 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 210 | }, |
| 211 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 212 | }</pre> |
| 213 | </div> |
| 214 | |
| 215 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 216 | <code class="details" id="analyzeSentiment">analyzeSentiment(body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 217 | <pre>Analyzes the sentiment of the provided text. |
| 218 | |
| 219 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 220 | body: object, The request body. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 221 | The object takes the form of: |
| 222 | |
| 223 | { # The sentiment analysis request message. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 224 | "encodingType": "A String", # The encoding type used by the API to calculate sentence offsets. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 225 | "document": { # ################################################################ # Represents the input to API methods. # Required. Input document. |
| 226 | "language": "A String", # The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. [Language Support](https://cloud.google.com/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned. |
| 227 | "content": "A String", # The content of the input in string format. Cloud audit logging exempt since it is based on user data. |
| 228 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error. |
| 229 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported. |
| 230 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | x__xgafv: string, V1 error format. |
| 234 | Allowed values |
| 235 | 1 - v1 error format |
| 236 | 2 - v2 error format |
| 237 | |
| 238 | Returns: |
| 239 | An object of the form: |
| 240 | |
| 241 | { # The sentiment analysis response message. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 242 | "language": "A String", # The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 243 | "sentences": [ # The sentiment for all the sentences in the document. |
| 244 | { # Represents a sentence in the input document. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 245 | "sentiment": { # Represents the feeling associated with the entire text or entities in the text. # For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 246 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 247 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 248 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 249 | "text": { # Represents an output piece of text. # The sentence text. |
| 250 | "content": "A String", # The content of the output text. |
| 251 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. |
| 252 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 253 | }, |
| 254 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 255 | "documentSentiment": { # Represents the feeling associated with the entire text or entities in the text. # The overall sentiment of the input document. |
| 256 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
| 257 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 258 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 259 | }</pre> |
| 260 | </div> |
| 261 | |
| 262 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 263 | <code class="details" id="analyzeSyntax">analyzeSyntax(body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 264 | <pre>Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 265 | |
| 266 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 267 | body: object, The request body. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 268 | The object takes the form of: |
| 269 | |
| 270 | { # The syntax analysis request message. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 271 | "document": { # ################################################################ # Represents the input to API methods. # Required. Input document. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 272 | "language": "A String", # The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. [Language Support](https://cloud.google.com/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 273 | "content": "A String", # The content of the input in string format. Cloud audit logging exempt since it is based on user data. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 274 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 275 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 276 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 277 | "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] | 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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 289 | "sentences": [ # Sentences in the input document. |
| 290 | { # Represents a sentence in the input document. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 291 | "sentiment": { # Represents the feeling associated with the entire text or entities in the text. # For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 292 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 293 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 294 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 295 | "text": { # Represents an output piece of text. # The sentence text. |
| 296 | "content": "A String", # The content of the output text. |
| 297 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. |
| 298 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 299 | }, |
| 300 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 301 | "tokens": [ # Tokens, along with their syntactic information, in the input document. |
| 302 | { # Represents the smallest syntactic building block of the text. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 303 | "partOfSpeech": { # Represents part of speech information for a token. Parts of speech are as defined in http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf # Parts of speech tag for this token. |
| 304 | "gender": "A String", # The grammatical gender. |
| 305 | "voice": "A String", # The grammatical voice. |
| 306 | "mood": "A String", # The grammatical mood. |
| 307 | "person": "A String", # The grammatical person. |
| 308 | "form": "A String", # The grammatical form. |
| 309 | "aspect": "A String", # The grammatical aspect. |
| 310 | "tag": "A String", # The part of speech tag. |
| 311 | "case": "A String", # The grammatical case. |
| 312 | "tense": "A String", # The grammatical tense. |
| 313 | "number": "A String", # The grammatical number. |
| 314 | "proper": "A String", # The grammatical properness. |
| 315 | "reciprocity": "A String", # The grammatical reciprocity. |
| 316 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 317 | "dependencyEdge": { # Represents dependency parse tree information for a token. (For more information on dependency labels, see http://www.aclweb.org/anthology/P13-2017 # Dependency tree parse for this token. |
| 318 | "headTokenIndex": 42, # Represents the head of this token in the dependency tree. This is the index of the token which has an arc going to this token. The index is the position of the token in the array of tokens returned by the API method. If this token is a root token, then the `head_token_index` is its own index. |
| 319 | "label": "A String", # The parse label for the token. |
| 320 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 321 | "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 322 | "text": { # Represents an output piece of text. # The token text. |
| 323 | "content": "A String", # The content of the output text. |
| 324 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. |
| 325 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 326 | }, |
| 327 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 328 | "language": "A String", # The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 329 | }</pre> |
| 330 | </div> |
| 331 | |
| 332 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 333 | <code class="details" id="annotateText">annotateText(body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 334 | <pre>A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 335 | |
| 336 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 337 | body: object, The request body. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 338 | The object takes the form of: |
| 339 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 340 | { # The request message for the text annotation API, which can perform multiple analysis types (sentiment, entities, and syntax) in one call. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 341 | "features": { # All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input. # Required. The enabled features. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 342 | "classifyText": True or False, # Classify the full document into categories. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 343 | "extractSyntax": True or False, # Extract syntax information. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 344 | "extractEntities": True or False, # Extract entities. |
| 345 | "extractEntitySentiment": True or False, # Extract entities and their associated sentiment. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 346 | "extractDocumentSentiment": True or False, # Extract document-level sentiment. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 347 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 348 | "encodingType": "A String", # The encoding type used by the API to calculate offsets. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 349 | "document": { # ################################################################ # Represents the input to API methods. # Required. Input document. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 350 | "language": "A String", # The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. [Language Support](https://cloud.google.com/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 351 | "content": "A String", # The content of the input in string format. Cloud audit logging exempt since it is based on user data. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 352 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 353 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 354 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 355 | } |
| 356 | |
| 357 | x__xgafv: string, V1 error format. |
| 358 | Allowed values |
| 359 | 1 - v1 error format |
| 360 | 2 - v2 error format |
| 361 | |
| 362 | Returns: |
| 363 | An object of the form: |
| 364 | |
| 365 | { # The text annotations response message. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 366 | "documentSentiment": { # Represents the feeling associated with the entire text or entities in the text. # The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment. |
| 367 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
| 368 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 369 | }, |
| 370 | "language": "A String", # The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See Document.language field for more details. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 371 | "categories": [ # Categories identified in the input document. |
| 372 | { # Represents a category returned from the text classifier. |
| 373 | "name": "A String", # The name of the category representing the document, from the [predefined taxonomy](https://cloud.google.com/natural-language/docs/categories). |
| 374 | "confidence": 3.14, # The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text. |
| 375 | }, |
| 376 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 377 | "entities": [ # Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities. |
| 378 | { # Represents a phrase in the text that is a known entity, such as a person, an organization, or location. The API associates information, such as salience and mentions, with entities. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 379 | "name": "A String", # The representative name for the entity. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 380 | "salience": 3.14, # The salience score associated with the entity in the [0, 1.0] range. The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient. |
| 381 | "type": "A String", # The entity type. |
| 382 | "sentiment": { # Represents the feeling associated with the entire text or entities in the text. # For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the aggregate sentiment expressed for this entity in the provided document. |
| 383 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
| 384 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 385 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 386 | "mentions": [ # The mentions of this entity in the input document. The API currently supports proper noun mentions. |
| 387 | { # Represents a mention for an entity in the text. Currently, proper noun mentions are supported. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 388 | "text": { # Represents an output piece of text. # The mention text. |
| 389 | "content": "A String", # The content of the output text. |
| 390 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. |
| 391 | }, |
| 392 | "type": "A String", # The type of the entity mention. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 393 | "sentiment": { # Represents the feeling associated with the entire text or entities in the text. # For calls to AnalyzeEntitySentiment or if AnnotateTextRequest.Features.extract_entity_sentiment is set to true, this field will contain the sentiment expressed for this mention of the entity in the provided document. |
| 394 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
| 395 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 396 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 397 | }, |
| 398 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 399 | "metadata": { # Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below. |
| 400 | "a_key": "A String", |
| 401 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 402 | }, |
| 403 | ], |
| 404 | "sentences": [ # Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax. |
| 405 | { # Represents a sentence in the input document. |
| 406 | "sentiment": { # Represents the feeling associated with the entire text or entities in the text. # For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 407 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
| 408 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 409 | }, |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 410 | "text": { # Represents an output piece of text. # The sentence text. |
| 411 | "content": "A String", # The content of the output text. |
| 412 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. |
| 413 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 414 | }, |
| 415 | ], |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 416 | "tokens": [ # Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax. |
| 417 | { # Represents the smallest syntactic building block of the text. |
| 418 | "partOfSpeech": { # Represents part of speech information for a token. Parts of speech are as defined in http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf # Parts of speech tag for this token. |
| 419 | "gender": "A String", # The grammatical gender. |
| 420 | "voice": "A String", # The grammatical voice. |
| 421 | "mood": "A String", # The grammatical mood. |
| 422 | "person": "A String", # The grammatical person. |
| 423 | "form": "A String", # The grammatical form. |
| 424 | "aspect": "A String", # The grammatical aspect. |
| 425 | "tag": "A String", # The part of speech tag. |
| 426 | "case": "A String", # The grammatical case. |
| 427 | "tense": "A String", # The grammatical tense. |
| 428 | "number": "A String", # The grammatical number. |
| 429 | "proper": "A String", # The grammatical properness. |
| 430 | "reciprocity": "A String", # The grammatical reciprocity. |
| 431 | }, |
| 432 | "dependencyEdge": { # Represents dependency parse tree information for a token. (For more information on dependency labels, see http://www.aclweb.org/anthology/P13-2017 # Dependency tree parse for this token. |
| 433 | "headTokenIndex": 42, # Represents the head of this token in the dependency tree. This is the index of the token which has an arc going to this token. The index is the position of the token in the array of tokens returned by the API method. If this token is a root token, then the `head_token_index` is its own index. |
| 434 | "label": "A String", # The parse label for the token. |
| 435 | }, |
| 436 | "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. |
| 437 | "text": { # Represents an output piece of text. # The token text. |
| 438 | "content": "A String", # The content of the output text. |
| 439 | "beginOffset": 42, # The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. |
| 440 | }, |
| 441 | }, |
| 442 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 443 | }</pre> |
| 444 | </div> |
| 445 | |
| 446 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 447 | <code class="details" id="classifyText">classifyText(body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 448 | <pre>Classifies a document into categories. |
| 449 | |
| 450 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 451 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 452 | The object takes the form of: |
| 453 | |
| 454 | { # The document classification request message. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 455 | "document": { # ################################################################ # Represents the input to API methods. # Required. Input document. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 456 | "language": "A String", # The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. [Language Support](https://cloud.google.com/natural-language/docs/languages) lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an `INVALID_ARGUMENT` error is returned. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 457 | "content": "A String", # The content of the input in string format. Cloud audit logging exempt since it is based on user data. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 458 | "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error. |
Yoshi Automation Bot | b6971b0 | 2020-11-26 17:16:03 -0800 | [diff] [blame] | 459 | "gcsContentUri": "A String", # The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 460 | }, |
| 461 | } |
| 462 | |
| 463 | x__xgafv: string, V1 error format. |
| 464 | Allowed values |
| 465 | 1 - v1 error format |
| 466 | 2 - v2 error format |
| 467 | |
| 468 | Returns: |
| 469 | An object of the form: |
| 470 | |
| 471 | { # The document classification response message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 472 | "categories": [ # Categories representing the input document. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 473 | { # Represents a category returned from the text classifier. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 474 | "name": "A String", # The name of the category representing the document, from the [predefined taxonomy](https://cloud.google.com/natural-language/docs/categories). |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 475 | "confidence": 3.14, # The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 476 | }, |
| 477 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 478 | }</pre> |
| 479 | </div> |
| 480 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 481 | <div class="method"> |
| 482 | <code class="details" id="close">close()</code> |
| 483 | <pre>Close httplib2 connections.</pre> |
| 484 | </div> |
| 485 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 486 | </body></html> |