language library

The Google Cloud client for the Cloud Natural Language API.

Provides natural language understanding technologies, such as sentiment analysis, entity recognition, entity sentiment analysis, and other text annotations, to developers.

Classes

AnalyzeEntitiesRequest
The entity analysis request message.
AnalyzeEntitiesResponse
The entity analysis response message.
AnalyzeSentimentRequest
The sentiment analysis request message.
AnalyzeSentimentResponse
The sentiment analysis response message.
AnnotateTextRequest
The request message for the text annotation API, which can perform multiple analysis types in one call.
AnnotateTextRequest_Features
All available features. Setting each one to true will enable that specific analysis for the input.
AnnotateTextResponse
The text annotations response message.
ClassificationCategory
Represents a category returned from the text classifier.
ClassifyTextRequest
The document classification request message.
ClassifyTextResponse
The document classification response message.
Document
Represents the input to API methods.
Document_Type
The document types enum.
EncodingType
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.
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 probability and mentions, with entities.
Entity_Type
The type of the entity. The table below lists the associated fields for entities that have different metadata.
EntityMention
Represents a mention for an entity in the text. Currently, proper noun mentions are supported.
EntityMention_Type
The supported types of mentions.
LanguageService
Provides text analysis operations such as sentiment analysis and entity recognition.
ModerateTextRequest
The document moderation request message.
ModerateTextRequest_ModelVersion
The model version to use for ModerateText.
ModerateTextResponse
The document moderation response message.
Sentence
Represents a sentence in the input document.
Sentiment
Represents the feeling associated with the entire text or entities in the text.
TextSpan
Represents a text span in the input document.

Exceptions / Errors

BadGatewayException
Exception thrown when the server returns a "502 Bad Gateway" response.
BadRequestException
Exception thrown when the server returns a "400 Bad Request" response.
CancelledException
Exception thrown when the server returns a "499 Cancelled" response.
ConfigurationException
Exception thrown when a method is called without correct configuration.
ConflictException
Exception thrown when the server returns a "409 Conflict" response.
ForbiddenException
Exception thrown when the server returns a "403 Forbidden" response.
GatewayTimeoutException
Exception thrown when the server returns a "504 Gateway Timeout" response.
InternalServerErrorException
Exception thrown when the server returns a "500 Internal Server Error" response.
LengthRequiredException
Exception thrown when the server returns a "411 Length Required" response.
MethodNotAllowedException
Exception thrown when the server returns a "405 Method Not Allowed" response.
NotFoundException
Exception thrown when the server returns a "404 Not Found" response.
NotImplementedException
Exception thrown when the server returns a "501 Not Implemented" response.
NotModifiedException
Exception thrown when the server returns a "304 Not Modified" response.
PreconditionFailedException
Exception thrown when the server returns a "412 Precondition Failed" response.
RequestRangeNotSatisfiableException
Exception thrown when the server returns a "416 Request Range Not Satisfiable" response.
RequestTimeoutException
Exception thrown when the server returns a "408 Request Timeout" response.
ServiceException
Exception thrown when an API call fails.
ServiceUnavailableException
Exception thrown when the server returns a "503 Service Unavailable" response.
TooManyRequestsException
Exception thrown when the server returns a "429 Too Many Requests" response.
UnauthorizedException
Exception thrown when the server returns a "401 Unauthorized" response.