Index: discovery/googleapis_beta/language__v1beta1.json |
diff --git a/discovery/googleapis_beta/language__v1beta1.json b/discovery/googleapis_beta/language__v1beta1.json |
index 350e8c372c18be025b76249a03f330bae614456f..e85f5f23c96986b1d71f53a63da96e24fb8c5cb8 100644 |
--- a/discovery/googleapis_beta/language__v1beta1.json |
+++ b/discovery/googleapis_beta/language__v1beta1.json |
@@ -25,6 +25,27 @@ |
"ownerDomain": "google.com", |
"ownerName": "Google", |
"parameters": { |
+ "oauth_token": { |
+ "description": "OAuth 2.0 token for the current user.", |
+ "location": "query", |
+ "type": "string" |
+ }, |
+ "bearer_token": { |
+ "description": "OAuth bearer token.", |
+ "location": "query", |
+ "type": "string" |
+ }, |
+ "upload_protocol": { |
+ "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", |
+ "location": "query", |
+ "type": "string" |
+ }, |
+ "prettyPrint": { |
+ "default": "true", |
+ "description": "Returns response with indentations and line breaks.", |
+ "location": "query", |
+ "type": "boolean" |
+ }, |
"fields": { |
"description": "Selector specifying which fields to include in a partial response.", |
"location": "query", |
@@ -69,13 +90,13 @@ |
"location": "query", |
"type": "string" |
}, |
- "access_token": { |
- "description": "OAuth access token.", |
+ "key": { |
+ "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", |
"location": "query", |
"type": "string" |
}, |
- "key": { |
- "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", |
+ "access_token": { |
+ "description": "OAuth access token.", |
"location": "query", |
"type": "string" |
}, |
@@ -89,96 +110,75 @@ |
"description": "Pretty-print response.", |
"location": "query", |
"type": "boolean" |
- }, |
- "oauth_token": { |
- "description": "OAuth 2.0 token for the current user.", |
- "location": "query", |
- "type": "string" |
- }, |
- "bearer_token": { |
- "description": "OAuth bearer token.", |
- "location": "query", |
- "type": "string" |
- }, |
- "upload_protocol": { |
- "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", |
- "location": "query", |
- "type": "string" |
- }, |
- "prettyPrint": { |
- "default": "true", |
- "description": "Returns response with indentations and line breaks.", |
- "location": "query", |
- "type": "boolean" |
} |
}, |
"protocol": "rest", |
"resources": { |
"documents": { |
"methods": { |
- "analyzeSentiment": { |
- "description": "Analyzes the sentiment of the provided text.", |
+ "analyzeEntities": { |
+ "description": "Finds named entities (currently finds proper names) in the text,\nentity types, salience, mentions for each entity, and other properties.", |
"httpMethod": "POST", |
- "id": "language.documents.analyzeSentiment", |
+ "id": "language.documents.analyzeEntities", |
"parameterOrder": [], |
"parameters": {}, |
- "path": "v1beta1/documents:analyzeSentiment", |
+ "path": "v1beta1/documents:analyzeEntities", |
"request": { |
- "$ref": "AnalyzeSentimentRequest" |
+ "$ref": "AnalyzeEntitiesRequest" |
}, |
"response": { |
- "$ref": "AnalyzeSentimentResponse" |
+ "$ref": "AnalyzeEntitiesResponse" |
}, |
"scopes": [ |
"https://www.googleapis.com/auth/cloud-platform" |
] |
}, |
- "annotateText": { |
- "description": "A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call.", |
+ "analyzeSyntax": { |
+ "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.", |
"httpMethod": "POST", |
- "id": "language.documents.annotateText", |
+ "id": "language.documents.analyzeSyntax", |
"parameterOrder": [], |
"parameters": {}, |
- "path": "v1beta1/documents:annotateText", |
+ "path": "v1beta1/documents:analyzeSyntax", |
"request": { |
- "$ref": "AnnotateTextRequest" |
+ "$ref": "AnalyzeSyntaxRequest" |
}, |
"response": { |
- "$ref": "AnnotateTextResponse" |
+ "$ref": "AnalyzeSyntaxResponse" |
}, |
"scopes": [ |
"https://www.googleapis.com/auth/cloud-platform" |
] |
}, |
- "analyzeEntities": { |
- "description": "Finds named entities (currently finds proper names) in the text,\nentity types, salience, mentions for each entity, and other properties.", |
+ "analyzeSentiment": { |
+ "description": "Analyzes the sentiment of the provided text.", |
"httpMethod": "POST", |
- "id": "language.documents.analyzeEntities", |
+ "id": "language.documents.analyzeSentiment", |
"parameterOrder": [], |
"parameters": {}, |
- "path": "v1beta1/documents:analyzeEntities", |
+ "path": "v1beta1/documents:analyzeSentiment", |
"request": { |
- "$ref": "AnalyzeEntitiesRequest" |
+ "$ref": "AnalyzeSentimentRequest" |
}, |
"response": { |
- "$ref": "AnalyzeEntitiesResponse" |
+ "$ref": "AnalyzeSentimentResponse" |
}, |
"scopes": [ |
"https://www.googleapis.com/auth/cloud-platform" |
] |
}, |
- "analyzeSyntax": { |
- "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.", |
+ "annotateText": { |
+ "description": "A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call.", |
"httpMethod": "POST", |
- "id": "language.documents.analyzeSyntax", |
+ "id": "language.documents.annotateText", |
"parameterOrder": [], |
"parameters": {}, |
- "path": "v1beta1/documents:analyzeSyntax", |
+ "path": "v1beta1/documents:annotateText", |
"request": { |
- "$ref": "AnalyzeSyntaxRequest" |
+ "$ref": "AnnotateTextRequest" |
}, |
"response": { |
- "$ref": "AnalyzeSyntaxResponse" |
+ "$ref": "AnnotateTextResponse" |
}, |
"scopes": [ |
"https://www.googleapis.com/auth/cloud-platform" |
@@ -187,13 +187,33 @@ |
} |
} |
}, |
- "revision": "20170206", |
+ "revision": "20170301", |
"rootUrl": "https://language.googleapis.com/", |
"schemas": { |
+ "TextSpan": { |
+ "description": "Represents an output piece of text.", |
+ "id": "TextSpan", |
+ "properties": { |
+ "beginOffset": { |
+ "description": "The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request.", |
+ "format": "int32", |
+ "type": "integer" |
+ }, |
+ "content": { |
+ "description": "The content of the output text.", |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
"Token": { |
"description": "Represents the smallest syntactic building block of the text.", |
"id": "Token", |
"properties": { |
+ "partOfSpeech": { |
+ "$ref": "PartOfSpeech", |
+ "description": "Parts of speech tag for this token." |
+ }, |
"text": { |
"$ref": "TextSpan", |
"description": "The token text." |
@@ -205,26 +225,6 @@ |
"lemma": { |
"description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.", |
"type": "string" |
- }, |
- "partOfSpeech": { |
- "$ref": "PartOfSpeech", |
- "description": "Parts of speech tag for this token." |
- } |
- }, |
- "type": "object" |
- }, |
- "TextSpan": { |
- "description": "Represents an output piece of text.", |
- "id": "TextSpan", |
- "properties": { |
- "beginOffset": { |
- "description": "The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request.", |
- "format": "int32", |
- "type": "integer" |
- }, |
- "content": { |
- "description": "The content of the output text.", |
- "type": "string" |
} |
}, |
"type": "object" |
@@ -233,11 +233,6 @@ |
"description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", |
"id": "Status", |
"properties": { |
- "code": { |
- "description": "The status code, which should be an enum value of google.rpc.Code.", |
- "format": "int32", |
- "type": "integer" |
- }, |
"message": { |
"description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", |
"type": "string" |
@@ -252,6 +247,11 @@ |
"type": "object" |
}, |
"type": "array" |
+ }, |
+ "code": { |
+ "description": "The status code, which should be an enum value of google.rpc.Code.", |
+ "format": "int32", |
+ "type": "integer" |
} |
}, |
"type": "object" |
@@ -304,6 +304,10 @@ |
"description": "################################################################ #\n\nRepresents the input to API methods.", |
"id": "Document", |
"properties": { |
+ "gcsContentUri": { |
+ "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", |
+ "type": "string" |
+ }, |
"language": { |
"description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.<br>\n**Current Language Restrictions:**\n\n * Only English, Spanish, and Japanese textual content are supported.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.", |
"type": "string" |
@@ -325,10 +329,6 @@ |
"content": { |
"description": "The content of the input in string format.", |
"type": "string" |
- }, |
- "gcsContentUri": { |
- "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.", |
- "type": "string" |
} |
}, |
"type": "object" |
@@ -337,35 +337,13 @@ |
"description": "Represents a sentence in the input document.", |
"id": "Sentence", |
"properties": { |
- "text": { |
- "$ref": "TextSpan", |
- "description": "The sentence text." |
- }, |
"sentiment": { |
"$ref": "Sentiment", |
"description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence." |
- } |
- }, |
- "type": "object" |
- }, |
- "Sentiment": { |
- "description": "Represents the feeling associated with the entire text or entities in\nthe text.", |
- "id": "Sentiment", |
- "properties": { |
- "polarity": { |
- "description": "DEPRECATED FIELD - This field is being deprecated in\nfavor of score. Please refer to our documentation at\nhttps://cloud.google.com/natural-language/docs for more information.", |
- "format": "float", |
- "type": "number" |
- }, |
- "score": { |
- "description": "Sentiment score between -1.0 (negative sentiment) and 1.0\n(positive sentiment).", |
- "format": "float", |
- "type": "number" |
}, |
- "magnitude": { |
- "description": "A non-negative number in the [0, +inf) range, which represents\nthe absolute magnitude of sentiment regardless of score (positive or\nnegative).", |
- "format": "float", |
- "type": "number" |
+ "text": { |
+ "$ref": "TextSpan", |
+ "description": "The sentence text." |
} |
}, |
"type": "object" |
@@ -392,139 +370,37 @@ |
}, |
"document": { |
"$ref": "Document", |
- "description": "Input document." |
- } |
- }, |
- "type": "object" |
- }, |
- "PartOfSpeech": { |
- "description": "Represents part of speech information for a token.", |
- "id": "PartOfSpeech", |
- "properties": { |
- "voice": { |
- "description": "The grammatical voice.", |
- "enum": [ |
- "VOICE_UNKNOWN", |
- "ACTIVE", |
- "CAUSATIVE", |
- "PASSIVE" |
- ], |
- "enumDescriptions": [ |
- "Voice is not applicable in the analyzed language or is not predicted.", |
- "Active", |
- "Causative", |
- "Passive" |
- ], |
- "type": "string" |
- }, |
- "aspect": { |
- "description": "The grammatical aspect.", |
- "enum": [ |
- "ASPECT_UNKNOWN", |
- "PERFECTIVE", |
- "IMPERFECTIVE", |
- "PROGRESSIVE" |
- ], |
- "enumDescriptions": [ |
- "Aspect is not applicable in the analyzed language or is not predicted.", |
- "Perfective", |
- "Imperfective", |
- "Progressive" |
- ], |
- "type": "string" |
- }, |
- "mood": { |
- "description": "The grammatical mood.", |
- "enum": [ |
- "MOOD_UNKNOWN", |
- "CONDITIONAL_MOOD", |
- "IMPERATIVE", |
- "INDICATIVE", |
- "INTERROGATIVE", |
- "JUSSIVE", |
- "SUBJUNCTIVE" |
- ], |
- "enumDescriptions": [ |
- "Mood is not applicable in the analyzed language or is not predicted.", |
- "Conditional", |
- "Imperative", |
- "Indicative", |
- "Interrogative", |
- "Jussive", |
- "Subjunctive" |
- ], |
- "type": "string" |
- }, |
- "tag": { |
- "description": "The part of speech tag.", |
- "enum": [ |
- "UNKNOWN", |
- "ADJ", |
- "ADP", |
- "ADV", |
- "CONJ", |
- "DET", |
- "NOUN", |
- "NUM", |
- "PRON", |
- "PRT", |
- "PUNCT", |
- "VERB", |
- "X", |
- "AFFIX" |
- ], |
- "enumDescriptions": [ |
- "Unknown", |
- "Adjective", |
- "Adposition (preposition and postposition)", |
- "Adverb", |
- "Conjunction", |
- "Determiner", |
- "Noun (common and proper)", |
- "Cardinal number", |
- "Pronoun", |
- "Particle or other function word", |
- "Punctuation", |
- "Verb (all tenses and modes)", |
- "Other: foreign words, typos, abbreviations", |
- "Affix" |
- ], |
- "type": "string" |
- }, |
- "gender": { |
- "description": "The grammatical gender.", |
- "enum": [ |
- "GENDER_UNKNOWN", |
- "FEMININE", |
- "MASCULINE", |
- "NEUTER" |
- ], |
- "enumDescriptions": [ |
- "Gender is not applicable in the analyzed language or is not predicted.", |
- "Feminine", |
- "Masculine", |
- "Neuter" |
- ], |
- "type": "string" |
- }, |
- "person": { |
- "description": "The grammatical person.", |
- "enum": [ |
- "PERSON_UNKNOWN", |
- "FIRST", |
- "SECOND", |
- "THIRD", |
- "REFLEXIVE_PERSON" |
- ], |
- "enumDescriptions": [ |
- "Person is not applicable in the analyzed language or is not predicted.", |
- "First", |
- "Second", |
- "Third", |
- "Reflexive" |
- ], |
- "type": "string" |
+ "description": "Input document." |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "Sentiment": { |
+ "description": "Represents the feeling associated with the entire text or entities in\nthe text.", |
+ "id": "Sentiment", |
+ "properties": { |
+ "magnitude": { |
+ "description": "A non-negative number in the [0, +inf) range, which represents\nthe absolute magnitude of sentiment regardless of score (positive or\nnegative).", |
+ "format": "float", |
+ "type": "number" |
+ }, |
+ "polarity": { |
+ "description": "DEPRECATED FIELD - This field is being deprecated in\nfavor of score. Please refer to our documentation at\nhttps://cloud.google.com/natural-language/docs for more information.", |
+ "format": "float", |
+ "type": "number" |
}, |
+ "score": { |
+ "description": "Sentiment score between -1.0 (negative sentiment) and 1.0\n(positive sentiment).", |
+ "format": "float", |
+ "type": "number" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "PartOfSpeech": { |
+ "description": "Represents part of speech information for a token.", |
+ "id": "PartOfSpeech", |
+ "properties": { |
"proper": { |
"description": "The grammatical properness.", |
"enum": [ |
@@ -660,6 +536,130 @@ |
"Dual" |
], |
"type": "string" |
+ }, |
+ "voice": { |
+ "description": "The grammatical voice.", |
+ "enum": [ |
+ "VOICE_UNKNOWN", |
+ "ACTIVE", |
+ "CAUSATIVE", |
+ "PASSIVE" |
+ ], |
+ "enumDescriptions": [ |
+ "Voice is not applicable in the analyzed language or is not predicted.", |
+ "Active", |
+ "Causative", |
+ "Passive" |
+ ], |
+ "type": "string" |
+ }, |
+ "aspect": { |
+ "description": "The grammatical aspect.", |
+ "enum": [ |
+ "ASPECT_UNKNOWN", |
+ "PERFECTIVE", |
+ "IMPERFECTIVE", |
+ "PROGRESSIVE" |
+ ], |
+ "enumDescriptions": [ |
+ "Aspect is not applicable in the analyzed language or is not predicted.", |
+ "Perfective", |
+ "Imperfective", |
+ "Progressive" |
+ ], |
+ "type": "string" |
+ }, |
+ "mood": { |
+ "description": "The grammatical mood.", |
+ "enum": [ |
+ "MOOD_UNKNOWN", |
+ "CONDITIONAL_MOOD", |
+ "IMPERATIVE", |
+ "INDICATIVE", |
+ "INTERROGATIVE", |
+ "JUSSIVE", |
+ "SUBJUNCTIVE" |
+ ], |
+ "enumDescriptions": [ |
+ "Mood is not applicable in the analyzed language or is not predicted.", |
+ "Conditional", |
+ "Imperative", |
+ "Indicative", |
+ "Interrogative", |
+ "Jussive", |
+ "Subjunctive" |
+ ], |
+ "type": "string" |
+ }, |
+ "tag": { |
+ "description": "The part of speech tag.", |
+ "enum": [ |
+ "UNKNOWN", |
+ "ADJ", |
+ "ADP", |
+ "ADV", |
+ "CONJ", |
+ "DET", |
+ "NOUN", |
+ "NUM", |
+ "PRON", |
+ "PRT", |
+ "PUNCT", |
+ "VERB", |
+ "X", |
+ "AFFIX" |
+ ], |
+ "enumDescriptions": [ |
+ "Unknown", |
+ "Adjective", |
+ "Adposition (preposition and postposition)", |
+ "Adverb", |
+ "Conjunction", |
+ "Determiner", |
+ "Noun (common and proper)", |
+ "Cardinal number", |
+ "Pronoun", |
+ "Particle or other function word", |
+ "Punctuation", |
+ "Verb (all tenses and modes)", |
+ "Other: foreign words, typos, abbreviations", |
+ "Affix" |
+ ], |
+ "type": "string" |
+ }, |
+ "gender": { |
+ "description": "The grammatical gender.", |
+ "enum": [ |
+ "GENDER_UNKNOWN", |
+ "FEMININE", |
+ "MASCULINE", |
+ "NEUTER" |
+ ], |
+ "enumDescriptions": [ |
+ "Gender is not applicable in the analyzed language or is not predicted.", |
+ "Feminine", |
+ "Masculine", |
+ "Neuter" |
+ ], |
+ "type": "string" |
+ }, |
+ "person": { |
+ "description": "The grammatical person.", |
+ "enum": [ |
+ "PERSON_UNKNOWN", |
+ "FIRST", |
+ "SECOND", |
+ "THIRD", |
+ "REFLEXIVE_PERSON" |
+ ], |
+ "enumDescriptions": [ |
+ "Person is not applicable in the analyzed language or is not predicted.", |
+ "First", |
+ "Second", |
+ "Third", |
+ "Reflexive" |
+ ], |
+ "type": "string" |
} |
}, |
"type": "object" |
@@ -695,6 +695,10 @@ |
"description": "The sentiment analysis response message.", |
"id": "AnalyzeSentimentResponse", |
"properties": { |
+ "documentSentiment": { |
+ "$ref": "Sentiment", |
+ "description": "The overall sentiment of the input document." |
+ }, |
"language": { |
"description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.", |
"type": "string" |
@@ -705,10 +709,6 @@ |
"$ref": "Sentence" |
}, |
"type": "array" |
- }, |
- "documentSentiment": { |
- "$ref": "Sentiment", |
- "description": "The overall sentiment of the input document." |
} |
}, |
"type": "object" |
@@ -717,16 +717,16 @@ |
"description": "The entity analysis response message.", |
"id": "AnalyzeEntitiesResponse", |
"properties": { |
- "language": { |
- "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", |
- "type": "string" |
- }, |
"entities": { |
"description": "The recognized entities in the input document.", |
"items": { |
"$ref": "Entity" |
}, |
"type": "array" |
+ }, |
+ "language": { |
+ "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", |
+ "type": "string" |
} |
}, |
"type": "object" |
@@ -789,6 +789,10 @@ |
"description": "The syntax analysis response message.", |
"id": "AnalyzeSyntaxResponse", |
"properties": { |
+ "language": { |
+ "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", |
+ "type": "string" |
+ }, |
"sentences": { |
"description": "Sentences in the input document.", |
"items": { |
@@ -802,10 +806,6 @@ |
"$ref": "Token" |
}, |
"type": "array" |
- }, |
- "language": { |
- "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", |
- "type": "string" |
} |
}, |
"type": "object" |
@@ -814,6 +814,22 @@ |
"description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.", |
"id": "AnnotateTextRequest", |
"properties": { |
+ "encodingType": { |
+ "description": "The encoding type used by the API to calculate offsets.", |
+ "enum": [ |
+ "NONE", |
+ "UTF8", |
+ "UTF16", |
+ "UTF32" |
+ ], |
+ "enumDescriptions": [ |
+ "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", |
+ "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", |
+ "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", |
+ "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." |
+ ], |
+ "type": "string" |
+ }, |
"document": { |
"$ref": "Document", |
"description": "Input document." |
@@ -821,9 +837,16 @@ |
"features": { |
"$ref": "Features", |
"description": "The enabled features." |
- }, |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "AnalyzeSentimentRequest": { |
+ "description": "The sentiment analysis request message.", |
+ "id": "AnalyzeSentimentRequest", |
+ "properties": { |
"encodingType": { |
- "description": "The encoding type used by the API to calculate offsets.", |
+ "description": "The encoding type used by the API to calculate sentence offsets for the\nsentence sentiment.", |
"enum": [ |
"NONE", |
"UTF8", |
@@ -837,6 +860,10 @@ |
"Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." |
], |
"type": "string" |
+ }, |
+ "document": { |
+ "$ref": "Document", |
+ "description": "Input document. Currently, `analyzeSentiment` only supports English text\n(Document.language=\"EN\")." |
} |
}, |
"type": "object" |
@@ -845,17 +872,6 @@ |
"description": "The text annotations response message.", |
"id": "AnnotateTextResponse", |
"properties": { |
- "entities": { |
- "description": "Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.", |
- "items": { |
- "$ref": "Entity" |
- }, |
- "type": "array" |
- }, |
- "documentSentiment": { |
- "$ref": "Sentiment", |
- "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment." |
- }, |
"language": { |
"description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.", |
"type": "string" |
@@ -873,33 +889,17 @@ |
"$ref": "Token" |
}, |
"type": "array" |
- } |
- }, |
- "type": "object" |
- }, |
- "AnalyzeSentimentRequest": { |
- "description": "The sentiment analysis request message.", |
- "id": "AnalyzeSentimentRequest", |
- "properties": { |
- "encodingType": { |
- "description": "The encoding type used by the API to calculate sentence offsets for the\nsentence sentiment.", |
- "enum": [ |
- "NONE", |
- "UTF8", |
- "UTF16", |
- "UTF32" |
- ], |
- "enumDescriptions": [ |
- "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.", |
- "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.", |
- "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.", |
- "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively." |
- ], |
- "type": "string" |
}, |
- "document": { |
- "$ref": "Document", |
- "description": "Input document. Currently, `analyzeSentiment` only supports English text\n(Document.language=\"EN\")." |
+ "entities": { |
+ "description": "Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.", |
+ "items": { |
+ "$ref": "Entity" |
+ }, |
+ "type": "array" |
+ }, |
+ "documentSentiment": { |
+ "$ref": "Sentiment", |
+ "description": "The overall sentiment for the document. Populated if the user enables\nAnnotateTextRequest.Features.extract_document_sentiment." |
} |
}, |
"type": "object" |