Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
- Service Configuration
- OAuth Scopes
- API Declaration
- Resources
- Types
- AnalyzeSyntaxRequest
- DependencyEdge
- Status
- PartOfSpeechProper
- PartOfSpeechTag
- Sentiment
- DocumentType
- AnalyzeSyntaxRequestEncodingType
- DependencyEdgeLabel
- PartOfSpeechVoice
- PartOfSpeechForm
- PartOfSpeechPerson
- Token
- EntityType
- StatusDetailsItem
- AnnotateTextRequest
- EntityMention
- TextSpan
- AnnotateTextResponse
- PartOfSpeechTense
- Features
- Document
- PartOfSpeechMood
- PartOfSpeechCase
- AnalyzeSentimentRequest
- Xgafv
- AnalyzeEntitiesResponse
- AnnotateTextRequestEncodingType
- PartOfSpeechNumber
- AnalyzeSentimentResponse
- AnalyzeEntitiesRequest
- AnalyzeEntitiesRequestEncodingType
- Entity
- AnalyzeSyntaxResponse
- EntityMetadata
- PartOfSpeechAspect
- PartOfSpeech
- PartOfSpeechReciprocity
- PartOfSpeechGender
- AnalyzeSentimentRequestEncodingType
- EntityMentionType
- Sentence
Google Cloud Natural Language API provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, and text annotations.
- languageService :: ServiceConfig
- cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]
- type LanguageAPI = DocumentsAnalyzeSyntaxResource :<|> (DocumentsAnnotateTextResource :<|> (DocumentsAnalyzeSentimentResource :<|> DocumentsAnalyzeEntitiesResource))
- module Network.Google.Resource.Language.Documents.AnalyzeEntities
- module Network.Google.Resource.Language.Documents.AnalyzeSentiment
- module Network.Google.Resource.Language.Documents.AnalyzeSyntax
- module Network.Google.Resource.Language.Documents.AnnotateText
- data AnalyzeSyntaxRequest
- analyzeSyntaxRequest :: AnalyzeSyntaxRequest
- asrEncodingType :: Lens' AnalyzeSyntaxRequest (Maybe AnalyzeSyntaxRequestEncodingType)
- asrDocument :: Lens' AnalyzeSyntaxRequest (Maybe Document)
- data DependencyEdge
- dependencyEdge :: DependencyEdge
- deHeadTokenIndex :: Lens' DependencyEdge (Maybe Int32)
- deLabel :: Lens' DependencyEdge (Maybe DependencyEdgeLabel)
- data Status
- status :: Status
- sDetails :: Lens' Status [StatusDetailsItem]
- sCode :: Lens' Status (Maybe Int32)
- sMessage :: Lens' Status (Maybe Text)
- data PartOfSpeechProper
- data PartOfSpeechTag
- data Sentiment
- sentiment :: Sentiment
- sScore :: Lens' Sentiment (Maybe Double)
- sMagnitude :: Lens' Sentiment (Maybe Double)
- data DocumentType
- data AnalyzeSyntaxRequestEncodingType
- data DependencyEdgeLabel
- = DELUnknown
- | DELAbbrev
- | DELAcomp
- | DELAdvcl
- | DELAdvmod
- | DELAmod
- | DELAppos
- | DELAttr
- | DELAux
- | DELAuxpass
- | DELCC
- | DELCcomp
- | DELConj
- | DELCsubj
- | DELCsubjpass
- | DELDep
- | DELDet
- | DELDiscourse
- | DELDobj
- | DELExpl
- | DELGoeswith
- | DELIobj
- | DELMark
- | DELMwe
- | DELMwv
- | DELNeg
- | DELNN
- | DELNpadvmod
- | DELNsubj
- | DELNsubjpass
- | DELNum
- | DELNumber
- | DELP
- | DELParataxis
- | DELPartmod
- | DELPcomp
- | DELPobj
- | DELPoss
- | DELPostneg
- | DELPrecomp
- | DELPreconj
- | DELPredet
- | DELPref
- | DELPrep
- | DELPronl
- | DELPrt
- | DELPS
- | DELQuantmod
- | DELRcmod
- | DELRcmodrel
- | DELRdrop
- | DELRef
- | DELRemnant
- | DELReparandum
- | DELRoot
- | DELSnum
- | DELSuff
- | DELTmod
- | DELTopic
- | DELVMod
- | DELVocative
- | DELXcomp
- | DELSuffix
- | DELTitle
- | DELAdvphmod
- | DELAuxcaus
- | DELAuxvv
- | DELDtmod
- | DELForeign
- | DELKW
- | DELList
- | DELNomc
- | DELNomcsubj
- | DELNomcsubjpass
- | DELNumc
- | DELCop
- | DELDislocated
- data PartOfSpeechVoice
- data PartOfSpeechForm
- = FormUnknown
- | Adnomial
- | Auxiliary
- | Complementizer
- | FinalEnding
- | Gerund
- | Realis
- | Irrealis
- | Short
- | Long
- | Order
- | Specific
- data PartOfSpeechPerson
- data Token
- token :: Token
- tDependencyEdge :: Lens' Token (Maybe DependencyEdge)
- tText :: Lens' Token (Maybe TextSpan)
- tLemma :: Lens' Token (Maybe Text)
- tPartOfSpeech :: Lens' Token (Maybe PartOfSpeech)
- data EntityType
- data StatusDetailsItem
- statusDetailsItem :: HashMap Text JSONValue -> StatusDetailsItem
- sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
- data AnnotateTextRequest
- annotateTextRequest :: AnnotateTextRequest
- atrEncodingType :: Lens' AnnotateTextRequest (Maybe AnnotateTextRequestEncodingType)
- atrFeatures :: Lens' AnnotateTextRequest (Maybe Features)
- atrDocument :: Lens' AnnotateTextRequest (Maybe Document)
- data EntityMention
- entityMention :: EntityMention
- emText :: Lens' EntityMention (Maybe TextSpan)
- emType :: Lens' EntityMention (Maybe EntityMentionType)
- data TextSpan
- textSpan :: TextSpan
- tsBeginOffSet :: Lens' TextSpan (Maybe Int32)
- tsContent :: Lens' TextSpan (Maybe Text)
- data AnnotateTextResponse
- annotateTextResponse :: AnnotateTextResponse
- atrEntities :: Lens' AnnotateTextResponse [Entity]
- atrTokens :: Lens' AnnotateTextResponse [Token]
- atrDocumentSentiment :: Lens' AnnotateTextResponse (Maybe Sentiment)
- atrSentences :: Lens' AnnotateTextResponse [Sentence]
- atrLanguage :: Lens' AnnotateTextResponse (Maybe Text)
- data PartOfSpeechTense
- data Features
- features :: Features
- fExtractSyntax :: Lens' Features (Maybe Bool)
- fExtractDocumentSentiment :: Lens' Features (Maybe Bool)
- fExtractEntities :: Lens' Features (Maybe Bool)
- data Document
- document :: Document
- dContent :: Lens' Document (Maybe Text)
- dLanguage :: Lens' Document (Maybe Text)
- dGcsContentURI :: Lens' Document (Maybe Text)
- dType :: Lens' Document (Maybe DocumentType)
- data PartOfSpeechMood
- data PartOfSpeechCase
- data AnalyzeSentimentRequest
- analyzeSentimentRequest :: AnalyzeSentimentRequest
- aEncodingType :: Lens' AnalyzeSentimentRequest (Maybe AnalyzeSentimentRequestEncodingType)
- aDocument :: Lens' AnalyzeSentimentRequest (Maybe Document)
- data Xgafv
- data AnalyzeEntitiesResponse
- analyzeEntitiesResponse :: AnalyzeEntitiesResponse
- aerEntities :: Lens' AnalyzeEntitiesResponse [Entity]
- aerLanguage :: Lens' AnalyzeEntitiesResponse (Maybe Text)
- data AnnotateTextRequestEncodingType
- data PartOfSpeechNumber
- = NumberUnknown
- | Singular
- | Plural
- | Dual
- data AnalyzeSentimentResponse
- analyzeSentimentResponse :: AnalyzeSentimentResponse
- asrDocumentSentiment :: Lens' AnalyzeSentimentResponse (Maybe Sentiment)
- asrSentences :: Lens' AnalyzeSentimentResponse [Sentence]
- asrLanguage :: Lens' AnalyzeSentimentResponse (Maybe Text)
- data AnalyzeEntitiesRequest
- analyzeEntitiesRequest :: AnalyzeEntitiesRequest
- aerEncodingType :: Lens' AnalyzeEntitiesRequest (Maybe AnalyzeEntitiesRequestEncodingType)
- aerDocument :: Lens' AnalyzeEntitiesRequest (Maybe Document)
- data AnalyzeEntitiesRequestEncodingType
- data Entity
- entity :: Entity
- eName :: Lens' Entity (Maybe Text)
- eSalience :: Lens' Entity (Maybe Double)
- eMetadata :: Lens' Entity (Maybe EntityMetadata)
- eType :: Lens' Entity (Maybe EntityType)
- eMentions :: Lens' Entity [EntityMention]
- data AnalyzeSyntaxResponse
- analyzeSyntaxResponse :: AnalyzeSyntaxResponse
- aTokens :: Lens' AnalyzeSyntaxResponse [Token]
- aSentences :: Lens' AnalyzeSyntaxResponse [Sentence]
- aLanguage :: Lens' AnalyzeSyntaxResponse (Maybe Text)
- data EntityMetadata
- entityMetadata :: HashMap Text Text -> EntityMetadata
- emAddtional :: Lens' EntityMetadata (HashMap Text Text)
- data PartOfSpeechAspect
- data PartOfSpeech
- partOfSpeech :: PartOfSpeech
- posProper :: Lens' PartOfSpeech (Maybe PartOfSpeechProper)
- posTag :: Lens' PartOfSpeech (Maybe PartOfSpeechTag)
- posPerson :: Lens' PartOfSpeech (Maybe PartOfSpeechPerson)
- posAspect :: Lens' PartOfSpeech (Maybe PartOfSpeechAspect)
- posCase :: Lens' PartOfSpeech (Maybe PartOfSpeechCase)
- posGender :: Lens' PartOfSpeech (Maybe PartOfSpeechGender)
- posReciprocity :: Lens' PartOfSpeech (Maybe PartOfSpeechReciprocity)
- posNumber :: Lens' PartOfSpeech (Maybe PartOfSpeechNumber)
- posVoice :: Lens' PartOfSpeech (Maybe PartOfSpeechVoice)
- posForm :: Lens' PartOfSpeech (Maybe PartOfSpeechForm)
- posTense :: Lens' PartOfSpeech (Maybe PartOfSpeechTense)
- posMood :: Lens' PartOfSpeech (Maybe PartOfSpeechMood)
- data PartOfSpeechReciprocity
- data PartOfSpeechGender
- data AnalyzeSentimentRequestEncodingType
- data EntityMentionType
- data Sentence
- sentence :: Sentence
- sSentiment :: Lens' Sentence (Maybe Sentiment)
- sText :: Lens' Sentence (Maybe TextSpan)
Service Configuration
languageService :: ServiceConfig Source #
Default request referring to version v1
of the Google Cloud Natural Language API. This contains the host and root path used as a starting point for constructing service requests.
OAuth Scopes
cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"] Source #
View and manage your data across Google Cloud Platform services
API Declaration
type LanguageAPI = DocumentsAnalyzeSyntaxResource :<|> (DocumentsAnnotateTextResource :<|> (DocumentsAnalyzeSentimentResource :<|> DocumentsAnalyzeEntitiesResource)) Source #
Represents the entirety of the methods and resources available for the Google Cloud Natural Language API service.
Resources
language.documents.analyzeEntities
language.documents.analyzeSentiment
language.documents.analyzeSyntax
language.documents.annotateText
Types
AnalyzeSyntaxRequest
data AnalyzeSyntaxRequest Source #
The syntax analysis request message.
See: analyzeSyntaxRequest
smart constructor.
analyzeSyntaxRequest :: AnalyzeSyntaxRequest Source #
Creates a value of AnalyzeSyntaxRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
asrEncodingType :: Lens' AnalyzeSyntaxRequest (Maybe AnalyzeSyntaxRequestEncodingType) Source #
The encoding type used by the API to calculate offsets.
asrDocument :: Lens' AnalyzeSyntaxRequest (Maybe Document) Source #
Input document.
DependencyEdge
data DependencyEdge Source #
Represents dependency parse tree information for a token. (For more information on dependency labels, see http://www.aclweb.org/anthology/P13-2017
See: dependencyEdge
smart constructor.
dependencyEdge :: DependencyEdge Source #
Creates a value of DependencyEdge
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
deHeadTokenIndex :: Lens' DependencyEdge (Maybe Int32) Source #
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.
deLabel :: Lens' DependencyEdge (Maybe DependencyEdgeLabel) Source #
The parse label for the token.
Status
The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.
See: status
smart constructor.
sDetails :: Lens' Status [StatusDetailsItem] Source #
A list of messages that carry the error details. There will be a common set of message types for APIs to use.
sCode :: Lens' Status (Maybe Int32) Source #
The status code, which should be an enum value of google.rpc.Code.
sMessage :: Lens' Status (Maybe Text) Source #
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
PartOfSpeechProper
data PartOfSpeechProper Source #
The grammatical properness.
ProperUnknown |
|
Proper |
|
NotProper |
|
PartOfSpeechTag
data PartOfSpeechTag Source #
The part of speech tag.
Unknown |
|
Adj |
|
Adp |
|
Adv |
|
Conj |
|
Det |
|
Noun |
|
Num |
|
Pron |
|
Prt |
|
Punct |
|
Verb |
|
X |
|
Affix |
|
Sentiment
Represents the feeling associated with the entire text or entities in the text.
See: sentiment
smart constructor.
sentiment :: Sentiment Source #
Creates a value of Sentiment
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sScore :: Lens' Sentiment (Maybe Double) Source #
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
sMagnitude :: Lens' Sentiment (Maybe Double) Source #
A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative).
DocumentType
data DocumentType Source #
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
TypeUnspecified |
|
PlainText |
|
HTML |
|
AnalyzeSyntaxRequestEncodingType
data AnalyzeSyntaxRequestEncodingType Source #
The encoding type used by the API to calculate offsets.
None |
|
UTF8 |
|
UTF16 |
|
UTF32 |
|
DependencyEdgeLabel
data DependencyEdgeLabel Source #
The parse label for the token.
DELUnknown |
|
DELAbbrev |
|
DELAcomp |
|
DELAdvcl |
|
DELAdvmod |
|
DELAmod |
|
DELAppos |
|
DELAttr |
|
DELAux |
|
DELAuxpass |
|
DELCC |
|
DELCcomp |
|
DELConj |
|
DELCsubj |
|
DELCsubjpass |
|
DELDep |
|
DELDet |
|
DELDiscourse |
|
DELDobj |
|
DELExpl |
|
DELGoeswith |
|
DELIobj |
|
DELMark |
|
DELMwe |
|
DELMwv |
|
DELNeg |
|
DELNN |
|
DELNpadvmod |
|
DELNsubj |
|
DELNsubjpass |
|
DELNum |
|
DELNumber |
|
DELP |
|
DELParataxis |
|
DELPartmod |
|
DELPcomp |
|
DELPobj |
|
DELPoss |
|
DELPostneg |
|
DELPrecomp |
|
DELPreconj |
|
DELPredet |
|
DELPref |
|
DELPrep |
|
DELPronl |
|
DELPrt |
|
DELPS |
|
DELQuantmod |
|
DELRcmod |
|
DELRcmodrel |
|
DELRdrop |
|
DELRef |
|
DELRemnant |
|
DELReparandum |
|
DELRoot |
|
DELSnum |
|
DELSuff |
|
DELTmod |
|
DELTopic |
|
DELVMod |
|
DELVocative |
|
DELXcomp |
|
DELSuffix |
|
DELTitle |
|
DELAdvphmod |
|
DELAuxcaus |
|
DELAuxvv |
|
DELDtmod |
|
DELForeign |
|
DELKW |
|
DELList |
|
DELNomc |
|
DELNomcsubj |
|
DELNomcsubjpass |
|
DELNumc |
|
DELCop |
|
DELDislocated |
|
PartOfSpeechVoice
data PartOfSpeechVoice Source #
The grammatical voice.
VoiceUnknown |
|
Active |
|
Causative |
|
Passive |
|
PartOfSpeechForm
data PartOfSpeechForm Source #
The grammatical form.
FormUnknown |
|
Adnomial |
|
Auxiliary |
|
Complementizer |
|
FinalEnding |
|
Gerund |
|
Realis |
|
Irrealis |
|
Short |
|
Long |
|
Order |
|
Specific |
|
PartOfSpeechPerson
data PartOfSpeechPerson Source #
The grammatical person.
PersonUnknown |
|
First |
|
Second |
|
Third |
|
ReflexivePerson |
|
Token
Represents the smallest syntactic building block of the text.
See: token
smart constructor.
Creates a value of Token
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
tDependencyEdge :: Lens' Token (Maybe DependencyEdge) Source #
Dependency tree parse for this token.
tPartOfSpeech :: Lens' Token (Maybe PartOfSpeech) Source #
Parts of speech tag for this token.
EntityType
data EntityType Source #
The entity type.
ETUnknown |
|
ETPerson |
|
ETLocation |
|
ETOrganization |
|
ETEvent |
|
ETWorkOfArt |
|
ETConsumerGood |
|
ETOther |
|
StatusDetailsItem
data StatusDetailsItem Source #
Creates a value of StatusDetailsItem
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue) Source #
Properties of the object. Contains field 'type with type URL.
AnnotateTextRequest
data AnnotateTextRequest Source #
The request message for the text annotation API, which can perform multiple analysis types (sentiment, entities, and syntax) in one call.
See: annotateTextRequest
smart constructor.
annotateTextRequest :: AnnotateTextRequest Source #
Creates a value of AnnotateTextRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
atrEncodingType :: Lens' AnnotateTextRequest (Maybe AnnotateTextRequestEncodingType) Source #
The encoding type used by the API to calculate offsets.
atrFeatures :: Lens' AnnotateTextRequest (Maybe Features) Source #
The enabled features.
atrDocument :: Lens' AnnotateTextRequest (Maybe Document) Source #
Input document.
EntityMention
data EntityMention Source #
Represents a mention for an entity in the text. Currently, proper noun mentions are supported.
See: entityMention
smart constructor.
entityMention :: EntityMention Source #
Creates a value of EntityMention
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
emType :: Lens' EntityMention (Maybe EntityMentionType) Source #
The type of the entity mention.
TextSpan
Represents an output piece of text.
See: textSpan
smart constructor.
Creates a value of TextSpan
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
tsBeginOffSet :: Lens' TextSpan (Maybe Int32) Source #
The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.
AnnotateTextResponse
data AnnotateTextResponse Source #
The text annotations response message.
See: annotateTextResponse
smart constructor.
annotateTextResponse :: AnnotateTextResponse Source #
Creates a value of AnnotateTextResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
atrEntities :: Lens' AnnotateTextResponse [Entity] Source #
Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.
atrTokens :: Lens' AnnotateTextResponse [Token] Source #
Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.
atrDocumentSentiment :: Lens' AnnotateTextResponse (Maybe Sentiment) Source #
The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.
atrSentences :: Lens' AnnotateTextResponse [Sentence] Source #
Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.
atrLanguage :: Lens' AnnotateTextResponse (Maybe Text) Source #
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.
PartOfSpeechTense
data PartOfSpeechTense Source #
The grammatical tense.
TenseUnknown |
|
ConditionalTense |
|
Future |
|
Past |
|
Present |
|
Imperfect |
|
Pluperfect |
|
Features
All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input.
See: features
smart constructor.
Creates a value of Features
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
Document
############################################################### Represents the input to API methods.
See: document
smart constructor.
Creates a value of Document
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dLanguage :: Lens' Document (Maybe Text) Source #
The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. **Current Language Restrictions:** * Only English, Spanish, and Japanese textual content are supported. 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.
dGcsContentURI :: Lens' Document (Maybe Text) Source #
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.
dType :: Lens' Document (Maybe DocumentType) Source #
Required. If the type is not set or is `TYPE_UNSPECIFIED`, returns an `INVALID_ARGUMENT` error.
PartOfSpeechMood
data PartOfSpeechMood Source #
The grammatical mood.
MoodUnknown |
|
ConditionalMood |
|
Imperative |
|
Indicative |
|
Interrogative |
|
Jussive |
|
Subjunctive |
|
PartOfSpeechCase
data PartOfSpeechCase Source #
The grammatical case.
CaseUnknown |
|
Accusative |
|
Adverbial |
|
Complementive |
|
Dative |
|
Genitive |
|
Instrumental |
|
Locative |
|
Nominative |
|
Oblique |
|
Partitive |
|
PrePositional |
|
ReflexiveCase |
|
RelativeCase |
|
Vocative |
|
AnalyzeSentimentRequest
data AnalyzeSentimentRequest Source #
The sentiment analysis request message.
See: analyzeSentimentRequest
smart constructor.
analyzeSentimentRequest :: AnalyzeSentimentRequest Source #
Creates a value of AnalyzeSentimentRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
aEncodingType :: Lens' AnalyzeSentimentRequest (Maybe AnalyzeSentimentRequestEncodingType) Source #
The encoding type used by the API to calculate sentence offsets.
aDocument :: Lens' AnalyzeSentimentRequest (Maybe Document) Source #
Input document. Currently, `analyzeSentiment` only supports English text (Document.language="EN").
Xgafv
V1 error format.
AnalyzeEntitiesResponse
data AnalyzeEntitiesResponse Source #
The entity analysis response message.
See: analyzeEntitiesResponse
smart constructor.
analyzeEntitiesResponse :: AnalyzeEntitiesResponse Source #
Creates a value of AnalyzeEntitiesResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
aerEntities :: Lens' AnalyzeEntitiesResponse [Entity] Source #
The recognized entities in the input document.
aerLanguage :: Lens' AnalyzeEntitiesResponse (Maybe Text) Source #
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.
AnnotateTextRequestEncodingType
data AnnotateTextRequestEncodingType Source #
The encoding type used by the API to calculate offsets.
ATRETNone |
|
ATRETUTF8 |
|
ATRETUTF16 |
|
ATRETUTF32 |
|
PartOfSpeechNumber
data PartOfSpeechNumber Source #
The grammatical number.
NumberUnknown |
|
Singular |
|
Plural |
|
Dual |
|
AnalyzeSentimentResponse
data AnalyzeSentimentResponse Source #
The sentiment analysis response message.
See: analyzeSentimentResponse
smart constructor.
analyzeSentimentResponse :: AnalyzeSentimentResponse Source #
Creates a value of AnalyzeSentimentResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
asrDocumentSentiment :: Lens' AnalyzeSentimentResponse (Maybe Sentiment) Source #
The overall sentiment of the input document.
asrSentences :: Lens' AnalyzeSentimentResponse [Sentence] Source #
The sentiment for all the sentences in the document.
asrLanguage :: Lens' AnalyzeSentimentResponse (Maybe Text) Source #
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.
AnalyzeEntitiesRequest
data AnalyzeEntitiesRequest Source #
The entity analysis request message.
See: analyzeEntitiesRequest
smart constructor.
analyzeEntitiesRequest :: AnalyzeEntitiesRequest Source #
Creates a value of AnalyzeEntitiesRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
aerEncodingType :: Lens' AnalyzeEntitiesRequest (Maybe AnalyzeEntitiesRequestEncodingType) Source #
The encoding type used by the API to calculate offsets.
aerDocument :: Lens' AnalyzeEntitiesRequest (Maybe Document) Source #
Input document.
AnalyzeEntitiesRequestEncodingType
data AnalyzeEntitiesRequestEncodingType Source #
The encoding type used by the API to calculate offsets.
AERETNone |
|
AERETUTF8 |
|
AERETUTF16 |
|
AERETUTF32 |
|
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.
See: entity
smart constructor.
eSalience :: Lens' Entity (Maybe Double) Source #
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.
eMetadata :: Lens' Entity (Maybe EntityMetadata) Source #
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.
eMentions :: Lens' Entity [EntityMention] Source #
The mentions of this entity in the input document. The API currently supports proper noun mentions.
AnalyzeSyntaxResponse
data AnalyzeSyntaxResponse Source #
The syntax analysis response message.
See: analyzeSyntaxResponse
smart constructor.
analyzeSyntaxResponse :: AnalyzeSyntaxResponse Source #
Creates a value of AnalyzeSyntaxResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
aTokens :: Lens' AnalyzeSyntaxResponse [Token] Source #
Tokens, along with their syntactic information, in the input document.
aSentences :: Lens' AnalyzeSyntaxResponse [Sentence] Source #
Sentences in the input document.
aLanguage :: Lens' AnalyzeSyntaxResponse (Maybe Text) Source #
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.
EntityMetadata
data EntityMetadata Source #
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.
See: entityMetadata
smart constructor.
Creates a value of EntityMetadata
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
PartOfSpeechAspect
data PartOfSpeechAspect Source #
The grammatical aspect.
AspectUnknown |
|
Perfective |
|
Imperfective |
|
Progressive |
|
PartOfSpeech
data PartOfSpeech Source #
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
See: partOfSpeech
smart constructor.
posProper :: Lens' PartOfSpeech (Maybe PartOfSpeechProper) Source #
The grammatical properness.
posTag :: Lens' PartOfSpeech (Maybe PartOfSpeechTag) Source #
The part of speech tag.
posPerson :: Lens' PartOfSpeech (Maybe PartOfSpeechPerson) Source #
The grammatical person.
posAspect :: Lens' PartOfSpeech (Maybe PartOfSpeechAspect) Source #
The grammatical aspect.
posCase :: Lens' PartOfSpeech (Maybe PartOfSpeechCase) Source #
The grammatical case.
posGender :: Lens' PartOfSpeech (Maybe PartOfSpeechGender) Source #
The grammatical gender.
posReciprocity :: Lens' PartOfSpeech (Maybe PartOfSpeechReciprocity) Source #
The grammatical reciprocity.
posNumber :: Lens' PartOfSpeech (Maybe PartOfSpeechNumber) Source #
The grammatical number.
posVoice :: Lens' PartOfSpeech (Maybe PartOfSpeechVoice) Source #
The grammatical voice.
posForm :: Lens' PartOfSpeech (Maybe PartOfSpeechForm) Source #
The grammatical form.
posTense :: Lens' PartOfSpeech (Maybe PartOfSpeechTense) Source #
The grammatical tense.
posMood :: Lens' PartOfSpeech (Maybe PartOfSpeechMood) Source #
The grammatical mood.
PartOfSpeechReciprocity
data PartOfSpeechReciprocity Source #
The grammatical reciprocity.
ReciprocityUnknown |
|
Reciprocal |
|
NonReciprocal |
|
PartOfSpeechGender
data PartOfSpeechGender Source #
The grammatical gender.
GenderUnknown |
|
Feminine |
|
Masculine |
|
Neuter |
|
AnalyzeSentimentRequestEncodingType
data AnalyzeSentimentRequestEncodingType Source #
The encoding type used by the API to calculate sentence offsets.
ASRETNone |
|
ASRETUTF8 |
|
ASRETUTF16 |
|
ASRETUTF32 |
|
EntityMentionType
data EntityMentionType Source #
The type of the entity mention.
EMTTypeUnknown |
|
EMTProper |
|
EMTCommon |
|
Sentence
Represents a sentence in the input document.
See: sentence
smart constructor.
Creates a value of Sentence
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired: