Members
(static) Aspect :number
The characteristic of a verb that expresses time flow during an event.
Properties:
| Name | Type | Description |
|---|---|---|
ASPECT_UNKNOWN |
number |
Aspect is not applicable in the analyzed language or is not predicted. |
PERFECTIVE |
number |
Perfective |
IMPERFECTIVE |
number |
Imperfective |
PROGRESSIVE |
number |
Progressive |
(static) Case :number
The grammatical function performed by a noun or pronoun in a phrase, clause, or sentence. In some languages, other parts of speech, such as adjective and determiner, take case inflection in agreement with the noun.
Properties:
| Name | Type | Description |
|---|---|---|
CASE_UNKNOWN |
number |
Case is not applicable in the analyzed language or is not predicted. |
ACCUSATIVE |
number |
Accusative |
ADVERBIAL |
number |
Adverbial |
COMPLEMENTIVE |
number |
Complementive |
DATIVE |
number |
Dative |
GENITIVE |
number |
Genitive |
INSTRUMENTAL |
number |
Instrumental |
LOCATIVE |
number |
Locative |
NOMINATIVE |
number |
Nominative |
OBLIQUE |
number |
Oblique |
PARTITIVE |
number |
Partitive |
PREPOSITIONAL |
number |
Prepositional |
REFLEXIVE_CASE |
number |
Reflexive |
RELATIVE_CASE |
number |
Relative |
VOCATIVE |
number |
Vocative |
(static, constant) EncodingType :number
Represents the text encoding that the caller uses to process the output.
Providing an EncodingType is recommended because the API provides the
beginning offsets for various outputs, such as tokens and mentions, and
languages that natively use different text encodings may access offsets
differently.
Properties:
| Name | Type | Description |
|---|---|---|
NONE |
number |
If |
UTF8 |
number |
Encoding-dependent information (such as |
UTF16 |
number |
Encoding-dependent information (such as |
UTF32 |
number |
Encoding-dependent information (such as |
(static) Form :number
Depending on the language, Form can be categorizing different forms of verbs, adjectives, adverbs, etc. For example, categorizing inflected endings of verbs and adjectives or distinguishing between short and long forms of adjectives and participles
Properties:
| Name | Type | Description |
|---|---|---|
FORM_UNKNOWN |
number |
Form is not applicable in the analyzed language or is not predicted. |
ADNOMIAL |
number |
Adnomial |
AUXILIARY |
number |
Auxiliary |
COMPLEMENTIZER |
number |
Complementizer |
FINAL_ENDING |
number |
Final ending |
GERUND |
number |
Gerund |
REALIS |
number |
Realis |
IRREALIS |
number |
Irrealis |
SHORT |
number |
Short form |
LONG |
number |
Long form |
ORDER |
number |
Order form |
SPECIFIC |
number |
Specific form |
(static) Gender :number
Gender classes of nouns reflected in the behaviour of associated words.
Properties:
| Name | Type | Description |
|---|---|---|
GENDER_UNKNOWN |
number |
Gender is not applicable in the analyzed language or is not predicted. |
FEMININE |
number |
Feminine |
MASCULINE |
number |
Masculine |
NEUTER |
number |
Neuter |
(static) Label :number
The parse label enum for the token.
Properties:
| Name | Type | Description |
|---|---|---|
UNKNOWN |
number |
Unknown |
ABBREV |
number |
Abbreviation modifier |
ACOMP |
number |
Adjectival complement |
ADVCL |
number |
Adverbial clause modifier |
ADVMOD |
number |
Adverbial modifier |
AMOD |
number |
Adjectival modifier of an NP |
APPOS |
number |
Appositional modifier of an NP |
ATTR |
number |
Attribute dependent of a copular verb |
AUX |
number |
Auxiliary (non-main) verb |
AUXPASS |
number |
Passive auxiliary |
CC |
number |
Coordinating conjunction |
CCOMP |
number |
Clausal complement of a verb or adjective |
CONJ |
number |
Conjunct |
CSUBJ |
number |
Clausal subject |
CSUBJPASS |
number |
Clausal passive subject |
DEP |
number |
Dependency (unable to determine) |
DET |
number |
Determiner |
DISCOURSE |
number |
Discourse |
DOBJ |
number |
Direct object |
EXPL |
number |
Expletive |
GOESWITH |
number |
Goes with (part of a word in a text not well edited) |
IOBJ |
number |
Indirect object |
MARK |
number |
Marker (word introducing a subordinate clause) |
MWE |
number |
Multi-word expression |
MWV |
number |
Multi-word verbal expression |
NEG |
number |
Negation modifier |
NN |
number |
Noun compound modifier |
NPADVMOD |
number |
Noun phrase used as an adverbial modifier |
NSUBJ |
number |
Nominal subject |
NSUBJPASS |
number |
Passive nominal subject |
NUM |
number |
Numeric modifier of a noun |
NUMBER |
number |
Element of compound number |
P |
number |
Punctuation mark |
PARATAXIS |
number |
Parataxis relation |
PARTMOD |
number |
Participial modifier |
PCOMP |
number |
The complement of a preposition is a clause |
POBJ |
number |
Object of a preposition |
POSS |
number |
Possession modifier |
POSTNEG |
number |
Postverbal negative particle |
PRECOMP |
number |
Predicate complement |
PRECONJ |
number |
Preconjunt |
PREDET |
number |
Predeterminer |
PREF |
number |
Prefix |
PREP |
number |
Prepositional modifier |
PRONL |
number |
The relationship between a verb and verbal morpheme |
PRT |
number |
Particle |
PS |
number |
Associative or possessive marker |
QUANTMOD |
number |
Quantifier phrase modifier |
RCMOD |
number |
Relative clause modifier |
RCMODREL |
number |
Complementizer in relative clause |
RDROP |
number |
Ellipsis without a preceding predicate |
REF |
number |
Referent |
REMNANT |
number |
Remnant |
REPARANDUM |
number |
Reparandum |
ROOT |
number |
Root |
SNUM |
number |
Suffix specifying a unit of number |
SUFF |
number |
Suffix |
TMOD |
number |
Temporal modifier |
TOPIC |
number |
Topic marker |
VMOD |
number |
Clause headed by an infinite form of the verb that modifies a noun |
VOCATIVE |
number |
Vocative |
XCOMP |
number |
Open clausal complement |
SUFFIX |
number |
Name suffix |
TITLE |
number |
Name title |
ADVPHMOD |
number |
Adverbial phrase modifier |
AUXCAUS |
number |
Causative auxiliary |
AUXVV |
number |
Helper auxiliary |
DTMOD |
number |
Rentaishi (Prenominal modifier) |
FOREIGN |
number |
Foreign words |
KW |
number |
Keyword |
LIST |
number |
List for chains of comparable items |
NOMC |
number |
Nominalized clause |
NOMCSUBJ |
number |
Nominalized clausal subject |
NOMCSUBJPASS |
number |
Nominalized clausal passive |
NUMC |
number |
Compound of numeric modifier |
COP |
number |
Copula |
DISLOCATED |
number |
Dislocated relation (for fronted/topicalized elements) |
ASP |
number |
Aspect marker |
GMOD |
number |
Genitive modifier |
GOBJ |
number |
Genitive object |
INFMOD |
number |
Infinitival modifier |
MES |
number |
Measure |
NCOMP |
number |
Nominal complement of a noun |
(static) Mood :number
The grammatical feature of verbs, used for showing modality and attitude.
Properties:
| Name | Type | Description |
|---|---|---|
MOOD_UNKNOWN |
number |
Mood is not applicable in the analyzed language or is not predicted. |
CONDITIONAL_MOOD |
number |
Conditional |
IMPERATIVE |
number |
Imperative |
INDICATIVE |
number |
Indicative |
INTERROGATIVE |
number |
Interrogative |
JUSSIVE |
number |
Jussive |
SUBJUNCTIVE |
number |
Subjunctive |
(static) Number :number
Count distinctions.
Properties:
| Name | Type | Description |
|---|---|---|
NUMBER_UNKNOWN |
number |
Number is not applicable in the analyzed language or is not predicted. |
SINGULAR |
number |
Singular |
PLURAL |
number |
Plural |
DUAL |
number |
Dual |
(static) Person :number
The distinction between the speaker, second person, third person, etc.
Properties:
| Name | Type | Description |
|---|---|---|
PERSON_UNKNOWN |
number |
Person is not applicable in the analyzed language or is not predicted. |
FIRST |
number |
First |
SECOND |
number |
Second |
THIRD |
number |
Third |
REFLEXIVE_PERSON |
number |
Reflexive |
(static) Proper :number
This category shows if the token is part of a proper name.
Properties:
| Name | Type | Description |
|---|---|---|
PROPER_UNKNOWN |
number |
Proper is not applicable in the analyzed language or is not predicted. |
PROPER |
number |
Proper |
NOT_PROPER |
number |
Not proper |
(static) Reciprocity :number
Reciprocal features of a pronoun.
Properties:
| Name | Type | Description |
|---|---|---|
RECIPROCITY_UNKNOWN |
number |
Reciprocity is not applicable in the analyzed language or is not predicted. |
RECIPROCAL |
number |
Reciprocal |
NON_RECIPROCAL |
number |
Non-reciprocal |
(static) Tag :number
The part of speech tags enum.
Properties:
| Name | Type | Description |
|---|---|---|
UNKNOWN |
number |
Unknown |
ADJ |
number |
Adjective |
ADP |
number |
Adposition (preposition and postposition) |
ADV |
number |
Adverb |
CONJ |
number |
Conjunction |
DET |
number |
Determiner |
NOUN |
number |
Noun (common and proper) |
NUM |
number |
Cardinal number |
PRON |
number |
Pronoun |
PRT |
number |
Particle or other function word |
PUNCT |
number |
Punctuation |
VERB |
number |
Verb (all tenses and modes) |
X |
number |
Other: foreign words, typos, abbreviations |
AFFIX |
number |
Affix |
(static) Tense :number
Time reference.
Properties:
| Name | Type | Description |
|---|---|---|
TENSE_UNKNOWN |
number |
Tense is not applicable in the analyzed language or is not predicted. |
CONDITIONAL_TENSE |
number |
Conditional |
FUTURE |
number |
Future |
PAST |
number |
Past |
PRESENT |
number |
Present |
IMPERFECT |
number |
Imperfect |
PLUPERFECT |
number |
Pluperfect |
(static) Type :number
The supported types of mentions.
Properties:
| Name | Type | Description |
|---|---|---|
TYPE_UNKNOWN |
number |
Unknown |
PROPER |
number |
Proper name |
COMMON |
number |
Common noun (or noun compound) |
(static) Type :number
The type of the entity. For most entity types, the associated metadata is a
Wikipedia URL (wikipedia_url) and Knowledge Graph MID (mid). The table
below lists the associated fields for entities that have different
metadata.
Properties:
| Name | Type | Description |
|---|---|---|
UNKNOWN |
number |
Unknown |
PERSON |
number |
Person |
LOCATION |
number |
Location |
ORGANIZATION |
number |
Organization |
EVENT |
number |
Event |
WORK_OF_ART |
number |
Artwork |
CONSUMER_GOOD |
number |
Consumer product |
OTHER |
number |
Other types of entities |
PHONE_NUMBER |
number |
Phone number
|
ADDRESS |
number |
Address
|
DATE |
number |
Date
|
NUMBER |
number |
Number |
PRICE |
number |
Price |
(static) Type :number
The document types enum.
Properties:
| Name | Type | Description |
|---|---|---|
TYPE_UNSPECIFIED |
number |
The content type is not specified. |
PLAIN_TEXT |
number |
Plain text |
HTML |
number |
HTML |
(static) Voice :number
The relationship between the action that a verb expresses and the participants identified by its arguments.
Properties:
| Name | Type | Description |
|---|---|---|
VOICE_UNKNOWN |
number |
Voice is not applicable in the analyzed language or is not predicted. |
ACTIVE |
number |
Active |
CAUSATIVE |
number |
Causative |
PASSIVE |
number |
Passive |
Type Definitions
AnalyzeEntitiesRequest
The entity analysis request message.
Properties:
| Name | Type | Description |
|---|---|---|
document |
Object |
Input document. This object should have the same structure as Document |
encodingType |
number |
The encoding type used by the API to calculate offsets. The number should be among the values of EncodingType |
- Source:
- See:
AnalyzeEntitiesResponse
The entity analysis response message.
Properties:
| Name | Type | Description |
|---|---|---|
entities |
Array.<Object> |
The recognized entities in the input document. This object should have the same structure as Entity |
language |
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. |
- Source:
- See:
AnalyzeEntitySentimentRequest
The entity-level sentiment analysis request message.
Properties:
| Name | Type | Description |
|---|---|---|
document |
Object |
Input document. This object should have the same structure as Document |
encodingType |
number |
The encoding type used by the API to calculate offsets. The number should be among the values of EncodingType |
- Source:
- See:
AnalyzeEntitySentimentResponse
The entity-level sentiment analysis response message.
Properties:
| Name | Type | Description |
|---|---|---|
entities |
Array.<Object> |
The recognized entities in the input document with associated sentiments. This object should have the same structure as Entity |
language |
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. |
- Source:
- See:
AnalyzeSentimentRequest
The sentiment analysis request message.
Properties:
| Name | Type | Description |
|---|---|---|
document |
Object |
Input document. This object should have the same structure as Document |
encodingType |
number |
The encoding type used by the API to calculate sentence offsets. The number should be among the values of EncodingType |
- Source:
- See:
AnalyzeSentimentResponse
The sentiment analysis response message.
Properties:
| Name | Type | Description |
|---|---|---|
documentSentiment |
Object |
The overall sentiment of the input document. This object should have the same structure as Sentiment |
language |
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 |
Array.<Object> |
The sentiment for all the sentences in the document. This object should have the same structure as Sentence |
- Source:
- See:
AnalyzeSyntaxRequest
The syntax analysis request message.
Properties:
| Name | Type | Description |
|---|---|---|
document |
Object |
Input document. This object should have the same structure as Document |
encodingType |
number |
The encoding type used by the API to calculate offsets. The number should be among the values of EncodingType |
- Source:
- See:
AnalyzeSyntaxResponse
The syntax analysis response message.
Properties:
| Name | Type | Description |
|---|---|---|
sentences |
Array.<Object> |
Sentences in the input document. This object should have the same structure as Sentence |
tokens |
Array.<Object> |
Tokens, along with their syntactic information, in the input document. This object should have the same structure as Token |
language |
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. |
- Source:
- See:
AnnotateTextRequest
The request message for the text annotation API, which can perform multiple analysis types (sentiment, entities, and syntax) in one call.
Properties:
| Name | Type | Description |
|---|---|---|
document |
Object |
Input document. This object should have the same structure as Document |
features |
Object |
The enabled features. This object should have the same structure as Features |
encodingType |
number |
The encoding type used by the API to calculate offsets. The number should be among the values of EncodingType |
- Source:
- See:
AnnotateTextResponse
The text annotations response message.
Properties:
| Name | Type | Description |
|---|---|---|
sentences |
Array.<Object> |
Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax. This object should have the same structure as Sentence |
tokens |
Array.<Object> |
Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax. This object should have the same structure as Token |
entities |
Array.<Object> |
Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities. This object should have the same structure as Entity |
documentSentiment |
Object |
The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment. This object should have the same structure as Sentiment |
language |
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. |
categories |
Array.<Object> |
Categories identified in the input document. This object should have the same structure as ClassificationCategory |
- Source:
- See:
ClassificationCategory
Represents a category returned from the text classifier.
Properties:
| Name | Type | Description |
|---|---|---|
name |
string |
The name of the category representing the document, from the predefined taxonomy. |
confidence |
number |
The classifier's confidence of the category. Number represents how certain the classifier is that this category represents the given text. |
- Source:
- See:
ClassifyTextRequest
The document classification request message.
Properties:
| Name | Type | Description |
|---|---|---|
document |
Object |
Input document. This object should have the same structure as Document |
- Source:
- See:
ClassifyTextResponse
The document classification response message.
Properties:
| Name | Type | Description |
|---|---|---|
categories |
Array.<Object> |
Categories representing the input document. This object should have the same structure as ClassificationCategory |
- Source:
- See:
DependencyEdge
Represents dependency parse tree information for a token. (For more information on dependency labels, see http://www.aclweb.org/anthology/P13-2017
Properties:
| Name | Type | Description |
|---|---|---|
headTokenIndex |
number |
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
|
label |
number |
The parse label for the token. The number should be among the values of Label |
- Source:
- See:
Document
################################################################ #
Represents the input to API methods.
Properties:
| Name | Type | Description |
|---|---|---|
type |
number |
Required. If the type is not set or is The number should be among the values of Type |
content |
string |
The content of the input in string format. Cloud audit logging exempt since it is based on user data. |
gcsContentUri |
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. |
language |
string |
The language of the document (if not specified, the language is
automatically detected). Both ISO and BCP-47 language codes are
accepted. |
- Source:
- See:
Entity
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.
Properties:
| Name | Type | Description |
|---|---|---|
name |
string |
The representative name for the entity. |
type |
number |
The entity type. The number should be among the values of Type |
metadata |
Object.<string, string> |
Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL ( |
salience |
number |
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. |
mentions |
Array.<Object> |
The mentions of this entity in the input document. The API currently supports proper noun mentions. This object should have the same structure as EntityMention |
sentiment |
Object |
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. This object should have the same structure as Sentiment |
- Source:
- See:
EntityMention
Represents a mention for an entity in the text. Currently, proper noun mentions are supported.
Properties:
| Name | Type | Description |
|---|---|---|
text |
Object |
The mention text. This object should have the same structure as TextSpan |
type |
number |
The type of the entity mention. The number should be among the values of Type |
sentiment |
Object |
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. This object should have the same structure as Sentiment |
- Source:
- See:
Features
All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input.
Properties:
| Name | Type | Description |
|---|---|---|
extractSyntax |
boolean |
Extract syntax information. |
extractEntities |
boolean |
Extract entities. |
extractDocumentSentiment |
boolean |
Extract document-level sentiment. |
extractEntitySentiment |
boolean |
Extract entities and their associated sentiment. |
classifyText |
boolean |
Classify the full document into categories. |
- Source:
- See:
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
Properties:
| Name | Type | Description |
|---|---|---|
tag |
number |
The part of speech tag. The number should be among the values of Tag |
aspect |
number |
The grammatical aspect. The number should be among the values of Aspect |
case |
number |
The grammatical case. The number should be among the values of Case |
form |
number |
The grammatical form. The number should be among the values of Form |
gender |
number |
The grammatical gender. The number should be among the values of Gender |
mood |
number |
The grammatical mood. The number should be among the values of Mood |
number |
number |
The grammatical number. The number should be among the values of Number |
person |
number |
The grammatical person. The number should be among the values of Person |
proper |
number |
The grammatical properness. The number should be among the values of Proper |
reciprocity |
number |
The grammatical reciprocity. The number should be among the values of Reciprocity |
tense |
number |
The grammatical tense. The number should be among the values of Tense |
voice |
number |
The grammatical voice. The number should be among the values of Voice |
- Source:
- See:
Sentence
Represents a sentence in the input document.
Properties:
| Name | Type | Description |
|---|---|---|
text |
Object |
The sentence text. This object should have the same structure as TextSpan |
sentiment |
Object |
For calls to AnalyzeSentiment or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence. This object should have the same structure as Sentiment |
- Source:
- See:
Sentiment
Represents the feeling associated with the entire text or entities in the text.
Properties:
| Name | Type | Description |
|---|---|---|
magnitude |
number |
A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative). |
score |
number |
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
- Source:
- See:
TextSpan
Represents an output piece of text.
Properties:
| Name | Type | Description |
|---|---|---|
content |
string |
The content of the output text. |
beginOffset |
number |
The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request. |
- Source:
- See:
Token
Represents the smallest syntactic building block of the text.
Properties:
| Name | Type | Description |
|---|---|---|
text |
Object |
The token text. This object should have the same structure as TextSpan |
partOfSpeech |
Object |
Parts of speech tag for this token. This object should have the same structure as PartOfSpeech |
dependencyEdge |
Object |
Dependency tree parse for this token. This object should have the same structure as DependencyEdge |
lemma |
string |
Lemma of the token. |