Regen all docs. (#700)
* Stop recursing if discovery == {}
* Generate docs with 'make docs'.
diff --git a/docs/dyn/language_v1beta2.documents.html b/docs/dyn/language_v1beta2.documents.html
index 2020777..9beb69c 100644
--- a/docs/dyn/language_v1beta2.documents.html
+++ b/docs/dyn/language_v1beta2.documents.html
@@ -72,7 +72,7 @@
</style>
-<h1><a href="language_v1beta2.html">Google Cloud Natural Language API</a> . <a href="language_v1beta2.documents.html">documents</a></h1>
+<h1><a href="language_v1beta2.html">Cloud Natural Language API</a> . <a href="language_v1beta2.documents.html">documents</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#analyzeEntities">analyzeEntities(body, x__xgafv=None)</a></code></p>
@@ -89,6 +89,9 @@
<p class="toc_element">
<code><a href="#annotateText">annotateText(body, x__xgafv=None)</a></code></p>
<p class="firstline">A convenience method that provides all syntax, sentiment, entity, and</p>
+<p class="toc_element">
+ <code><a href="#classifyText">classifyText(body, x__xgafv=None)</a></code></p>
+<p class="firstline">Classifies a document into categories.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="analyzeEntities">analyzeEntities(body, x__xgafv=None)</code>
@@ -105,6 +108,7 @@
#
# Represents the input to API methods.
"content": "A String", # The content of the input in string format.
+ # Cloud audit logging exempt since it is based on user data.
"type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
# returns an `INVALID_ARGUMENT` error.
"language": "A String", # The language of the document (if not specified, the language is
@@ -142,6 +146,7 @@
# true, this field will contain the aggregate sentiment expressed for this
# entity in the provided document.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
@@ -169,6 +174,7 @@
# true, this field will contain the sentiment expressed for this mention of
# the entity in the provided document.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
@@ -180,8 +186,9 @@
"type": "A String", # The entity type.
"metadata": { # Metadata associated with the entity.
#
- # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
- # available. The associated keys are "wikipedia_url" and "mid", respectively.
+ # 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.
"a_key": "A String",
},
},
@@ -207,6 +214,7 @@
#
# Represents the input to API methods.
"content": "A String", # The content of the input in string format.
+ # Cloud audit logging exempt since it is based on user data.
"type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
# returns an `INVALID_ARGUMENT` error.
"language": "A String", # The language of the document (if not specified, the language is
@@ -243,6 +251,7 @@
# true, this field will contain the aggregate sentiment expressed for this
# entity in the provided document.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
@@ -270,6 +279,7 @@
# true, this field will contain the sentiment expressed for this mention of
# the entity in the provided document.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
@@ -281,8 +291,9 @@
"type": "A String", # The entity type.
"metadata": { # Metadata associated with the entity.
#
- # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
- # available. The associated keys are "wikipedia_url" and "mid", respectively.
+ # 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.
"a_key": "A String",
},
},
@@ -302,10 +313,13 @@
The object takes the form of:
{ # The sentiment analysis request message.
+ "encodingType": "A String", # The encoding type used by the API to calculate sentence offsets for the
+ # sentence sentiment.
"document": { # ################################################################ # # Input document.
#
# Represents the input to API methods.
"content": "A String", # The content of the input in string format.
+ # Cloud audit logging exempt since it is based on user data.
"type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
# returns an `INVALID_ARGUMENT` error.
"language": "A String", # The language of the document (if not specified, the language is
@@ -321,8 +335,6 @@
# details, see https://cloud.google.com/storage/docs/reference-uris.
# NOTE: Cloud Storage object versioning is not supported.
},
- "encodingType": "A String", # The encoding type used by the API to calculate sentence offsets for the
- # sentence sentiment.
}
x__xgafv: string, V1 error format.
@@ -336,6 +348,7 @@
{ # The sentiment analysis response message.
"documentSentiment": { # Represents the feeling associated with the entire text or entities in # The overall sentiment of the input document.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
@@ -356,6 +369,7 @@
# AnnotateTextRequest.Features.extract_document_sentiment is set to
# true, this field will contain the sentiment for the sentence.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
@@ -378,10 +392,12 @@
The object takes the form of:
{ # The syntax analysis request message.
+ "encodingType": "A String", # The encoding type used by the API to calculate offsets.
"document": { # ################################################################ # # Input document.
#
# Represents the input to API methods.
"content": "A String", # The content of the input in string format.
+ # Cloud audit logging exempt since it is based on user data.
"type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
# returns an `INVALID_ARGUMENT` error.
"language": "A String", # The language of the document (if not specified, the language is
@@ -397,7 +413,6 @@
# details, see https://cloud.google.com/storage/docs/reference-uris.
# NOTE: Cloud Storage object versioning is not supported.
},
- "encodingType": "A String", # The encoding type used by the API to calculate offsets.
}
x__xgafv: string, V1 error format.
@@ -411,25 +426,7 @@
{ # The syntax analysis response message.
"tokens": [ # Tokens, along with their syntactic information, in the input document.
{ # Represents the smallest syntactic building block of the text.
- "text": { # Represents an output piece of text. # The token text.
- "content": "A String", # The content of the output text.
- "beginOffset": 42, # The API calculates the beginning offset of the content in the original
- # document according to the EncodingType specified in the API request.
- },
- "partOfSpeech": { # Represents part of speech information for a token. # Parts of speech tag for this token.
- "case": "A String", # The grammatical case.
- "reciprocity": "A String", # The grammatical reciprocity.
- "mood": "A String", # The grammatical mood.
- "form": "A String", # The grammatical form.
- "gender": "A String", # The grammatical gender.
- "number": "A String", # The grammatical number.
- "person": "A String", # The grammatical person.
- "tag": "A String", # The part of speech tag.
- "tense": "A String", # The grammatical tense.
- "aspect": "A String", # The grammatical aspect.
- "proper": "A String", # The grammatical properness.
- "voice": "A String", # The grammatical voice.
- },
+ "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
"dependencyEdge": { # Represents dependency parse tree information for a token. # Dependency tree parse for this token.
"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.
@@ -438,7 +435,25 @@
# `head_token_index` is its own index.
"label": "A String", # The parse label for the token.
},
- "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
+ "partOfSpeech": { # Represents part of speech information for a token. # Parts of speech tag for this token.
+ "case": "A String", # The grammatical case.
+ "mood": "A String", # The grammatical mood.
+ "form": "A String", # The grammatical form.
+ "gender": "A String", # The grammatical gender.
+ "aspect": "A String", # The grammatical aspect.
+ "number": "A String", # The grammatical number.
+ "person": "A String", # The grammatical person.
+ "tag": "A String", # The part of speech tag.
+ "tense": "A String", # The grammatical tense.
+ "reciprocity": "A String", # The grammatical reciprocity.
+ "proper": "A String", # The grammatical properness.
+ "voice": "A String", # The grammatical voice.
+ },
+ "text": { # Represents an output piece of text. # The token text.
+ "content": "A String", # The content of the output text.
+ "beginOffset": 42, # The API calculates the beginning offset of the content in the original
+ # document according to the EncodingType specified in the API request.
+ },
},
],
"language": "A String", # The language of the text, which will be the same as the language specified
@@ -455,6 +470,7 @@
# AnnotateTextRequest.Features.extract_document_sentiment is set to
# true, this field will contain the sentiment for the sentence.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
@@ -482,6 +498,7 @@
#
# Represents the input to API methods.
"content": "A String", # The content of the input in string format.
+ # Cloud audit logging exempt since it is based on user data.
"type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
# returns an `INVALID_ARGUMENT` error.
"language": "A String", # The language of the document (if not specified, the language is
@@ -499,10 +516,14 @@
},
"features": { # All available features for sentiment, syntax, and semantic analysis. # The enabled features.
# Setting each one to true will enable that specific analysis for the input.
- "extractEntitySentiment": True or False, # Extract entities and their associated sentiment.
+ # Next ID: 10
"extractDocumentSentiment": True or False, # Extract document-level sentiment.
- "extractEntities": True or False, # Extract entities.
+ "extractEntitySentiment": True or False, # Extract entities and their associated sentiment.
"extractSyntax": True or False, # Extract syntax information.
+ "extractEntities": True or False, # Extract entities.
+ "classifyText": True or False, # Classify the full document into categories. If this is true,
+ # the API will use the default model which classifies into a
+ # [predefined taxonomy](/natural-language/docs/categories).
},
}
@@ -515,29 +536,14 @@
An object of the form:
{ # The text annotations response message.
+ "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.
"tokens": [ # Tokens, along with their syntactic information, in the input document.
# Populated if the user enables
# AnnotateTextRequest.Features.extract_syntax.
{ # Represents the smallest syntactic building block of the text.
- "text": { # Represents an output piece of text. # The token text.
- "content": "A String", # The content of the output text.
- "beginOffset": 42, # The API calculates the beginning offset of the content in the original
- # document according to the EncodingType specified in the API request.
- },
- "partOfSpeech": { # Represents part of speech information for a token. # Parts of speech tag for this token.
- "case": "A String", # The grammatical case.
- "reciprocity": "A String", # The grammatical reciprocity.
- "mood": "A String", # The grammatical mood.
- "form": "A String", # The grammatical form.
- "gender": "A String", # The grammatical gender.
- "number": "A String", # The grammatical number.
- "person": "A String", # The grammatical person.
- "tag": "A String", # The part of speech tag.
- "tense": "A String", # The grammatical tense.
- "aspect": "A String", # The grammatical aspect.
- "proper": "A String", # The grammatical properness.
- "voice": "A String", # The grammatical voice.
- },
+ "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
"dependencyEdge": { # Represents dependency parse tree information for a token. # Dependency tree parse for this token.
"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.
@@ -546,7 +552,25 @@
# `head_token_index` is its own index.
"label": "A String", # The parse label for the token.
},
- "lemma": "A String", # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
+ "partOfSpeech": { # Represents part of speech information for a token. # Parts of speech tag for this token.
+ "case": "A String", # The grammatical case.
+ "mood": "A String", # The grammatical mood.
+ "form": "A String", # The grammatical form.
+ "gender": "A String", # The grammatical gender.
+ "aspect": "A String", # The grammatical aspect.
+ "number": "A String", # The grammatical number.
+ "person": "A String", # The grammatical person.
+ "tag": "A String", # The part of speech tag.
+ "tense": "A String", # The grammatical tense.
+ "reciprocity": "A String", # The grammatical reciprocity.
+ "proper": "A String", # The grammatical properness.
+ "voice": "A String", # The grammatical voice.
+ },
+ "text": { # Represents an output piece of text. # The token text.
+ "content": "A String", # The content of the output text.
+ "beginOffset": 42, # The API calculates the beginning offset of the content in the original
+ # document according to the EncodingType specified in the API request.
+ },
},
],
"entities": [ # Entities, along with their semantic information, in the input document.
@@ -561,6 +585,7 @@
# true, this field will contain the aggregate sentiment expressed for this
# entity in the provided document.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
@@ -588,6 +613,7 @@
# true, this field will contain the sentiment expressed for this mention of
# the entity in the provided document.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
@@ -599,8 +625,9 @@
"type": "A String", # The entity type.
"metadata": { # Metadata associated with the entity.
#
- # Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
- # available. The associated keys are "wikipedia_url" and "mid", respectively.
+ # 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.
"a_key": "A String",
},
},
@@ -608,15 +635,13 @@
"documentSentiment": { # Represents the feeling associated with the entire text or entities in # The overall sentiment for the document. Populated if the user enables
# AnnotateTextRequest.Features.extract_document_sentiment.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"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).
},
- "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.
"sentences": [ # Sentences in the input document. Populated if the user enables
# AnnotateTextRequest.Features.extract_syntax.
{ # Represents a sentence in the input document.
@@ -629,6 +654,7 @@
# AnnotateTextRequest.Features.extract_document_sentiment is set to
# true, this field will contain the sentiment for the sentence.
# the text.
+ # Next ID: 6
"score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0
# (positive sentiment).
"magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents
@@ -637,6 +663,65 @@
},
},
],
+ "categories": [ # Categories identified in the input document.
+ { # Represents a category returned from the text classifier.
+ "confidence": 3.14, # The classifier's confidence of the category. Number represents how certain
+ # the classifier is that this category represents the given text.
+ "name": "A String", # The name of the category representing the document, from the [predefined
+ # taxonomy](/natural-language/docs/categories).
+ },
+ ],
+ }</pre>
+</div>
+
+<div class="method">
+ <code class="details" id="classifyText">classifyText(body, x__xgafv=None)</code>
+ <pre>Classifies a document into categories.
+
+Args:
+ body: object, The request body. (required)
+ The object takes the form of:
+
+{ # The document classification request message.
+ "document": { # ################################################################ # # Input document.
+ #
+ # Represents the input to API methods.
+ "content": "A String", # The content of the input in string format.
+ # Cloud audit logging exempt since it is based on user data.
+ "type": "A String", # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
+ # returns an `INVALID_ARGUMENT` error.
+ "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.<br>
+ # [Language Support](/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.
+ "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.
+ },
+ }
+
+ x__xgafv: string, V1 error format.
+ Allowed values
+ 1 - v1 error format
+ 2 - v2 error format
+
+Returns:
+ An object of the form:
+
+ { # The document classification response message.
+ "categories": [ # Categories representing the input document.
+ { # Represents a category returned from the text classifier.
+ "confidence": 3.14, # The classifier's confidence of the category. Number represents how certain
+ # the classifier is that this category represents the given text.
+ "name": "A String", # The name of the category representing the document, from the [predefined
+ # taxonomy](/natural-language/docs/categories).
+ },
+ ],
}</pre>
</div>