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
- SpanScore
- AnalyzeCommentResponse
- SuggestCommentScoreResponse
- Context
- Score
- ArticleAndParentComment
- AttributeParameters
- TextEntry
- AttributeScores
- Xgafv
- ScoreType
- AnalyzeCommentResponseAttributeScores
- SuggestCommentScoreRequest
- AttributeParametersScoreType
- AnalyzeCommentRequest
- SuggestCommentScoreRequestAttributeScores
- AnalyzeCommentRequestRequestedAttributes
- TextEntryType
Synopsis
- commentAnalyzerService :: ServiceConfig
- userInfoEmailScope :: Proxy '["https://www.googleapis.com/auth/userinfo.email"]
- data SpanScore
- spanScore :: SpanScore
- ssBegin :: Lens' SpanScore (Maybe Int32)
- ssScore :: Lens' SpanScore (Maybe Score)
- ssEnd :: Lens' SpanScore (Maybe Int32)
- data AnalyzeCommentResponse
- analyzeCommentResponse :: AnalyzeCommentResponse
- acrDetectedLanguages :: Lens' AnalyzeCommentResponse [Text]
- acrClientToken :: Lens' AnalyzeCommentResponse (Maybe Text)
- acrLanguages :: Lens' AnalyzeCommentResponse [Text]
- acrAttributeScores :: Lens' AnalyzeCommentResponse (Maybe AnalyzeCommentResponseAttributeScores)
- data SuggestCommentScoreResponse
- suggestCommentScoreResponse :: SuggestCommentScoreResponse
- scsrDetectedLanguages :: Lens' SuggestCommentScoreResponse [Text]
- scsrClientToken :: Lens' SuggestCommentScoreResponse (Maybe Text)
- scsrRequestedLanguages :: Lens' SuggestCommentScoreResponse [Text]
- data Context
- context :: Context
- cEntries :: Lens' Context [TextEntry]
- cArticleAndParentComment :: Lens' Context (Maybe ArticleAndParentComment)
- data Score
- score :: Score
- sValue :: Lens' Score (Maybe Double)
- sType :: Lens' Score (Maybe ScoreType)
- data ArticleAndParentComment
- articleAndParentComment :: ArticleAndParentComment
- aapcArticle :: Lens' ArticleAndParentComment (Maybe TextEntry)
- aapcParentComment :: Lens' ArticleAndParentComment (Maybe TextEntry)
- data AttributeParameters
- attributeParameters :: AttributeParameters
- apScoreThreshold :: Lens' AttributeParameters (Maybe Double)
- apScoreType :: Lens' AttributeParameters (Maybe AttributeParametersScoreType)
- data TextEntry
- textEntry :: TextEntry
- teText :: Lens' TextEntry (Maybe Text)
- teType :: Lens' TextEntry (Maybe TextEntryType)
- data AttributeScores
- attributeScores :: AttributeScores
- asSummaryScore :: Lens' AttributeScores (Maybe Score)
- asSpanScores :: Lens' AttributeScores [SpanScore]
- data Xgafv
- data ScoreType
- data AnalyzeCommentResponseAttributeScores
- analyzeCommentResponseAttributeScores :: HashMap Text AttributeScores -> AnalyzeCommentResponseAttributeScores
- acrasAddtional :: Lens' AnalyzeCommentResponseAttributeScores (HashMap Text AttributeScores)
- data SuggestCommentScoreRequest
- suggestCommentScoreRequest :: SuggestCommentScoreRequest
- sContext :: Lens' SuggestCommentScoreRequest (Maybe Context)
- sClientToken :: Lens' SuggestCommentScoreRequest (Maybe Text)
- sLanguages :: Lens' SuggestCommentScoreRequest [Text]
- sAttributeScores :: Lens' SuggestCommentScoreRequest (Maybe SuggestCommentScoreRequestAttributeScores)
- sSessionId :: Lens' SuggestCommentScoreRequest (Maybe Text)
- sComment :: Lens' SuggestCommentScoreRequest (Maybe TextEntry)
- sCommUnityId :: Lens' SuggestCommentScoreRequest (Maybe Text)
- data AttributeParametersScoreType
- data AnalyzeCommentRequest
- analyzeCommentRequest :: AnalyzeCommentRequest
- aContext :: Lens' AnalyzeCommentRequest (Maybe Context)
- aClientToken :: Lens' AnalyzeCommentRequest (Maybe Text)
- aSpanAnnotations :: Lens' AnalyzeCommentRequest (Maybe Bool)
- aDoNotStore :: Lens' AnalyzeCommentRequest (Maybe Bool)
- aLanguages :: Lens' AnalyzeCommentRequest [Text]
- aRequestedAttributes :: Lens' AnalyzeCommentRequest (Maybe AnalyzeCommentRequestRequestedAttributes)
- aSessionId :: Lens' AnalyzeCommentRequest (Maybe Text)
- aComment :: Lens' AnalyzeCommentRequest (Maybe TextEntry)
- aCommUnityId :: Lens' AnalyzeCommentRequest (Maybe Text)
- data SuggestCommentScoreRequestAttributeScores
- suggestCommentScoreRequestAttributeScores :: HashMap Text AttributeScores -> SuggestCommentScoreRequestAttributeScores
- scsrasAddtional :: Lens' SuggestCommentScoreRequestAttributeScores (HashMap Text AttributeScores)
- data AnalyzeCommentRequestRequestedAttributes
- analyzeCommentRequestRequestedAttributes :: HashMap Text AttributeParameters -> AnalyzeCommentRequestRequestedAttributes
- acrraAddtional :: Lens' AnalyzeCommentRequestRequestedAttributes (HashMap Text AttributeParameters)
- data TextEntryType
Service Configuration
commentAnalyzerService :: ServiceConfig Source #
Default request referring to version v1alpha1
of the Perspective Comment Analyzer API. This contains the host and root path used as a starting point for constructing service requests.
OAuth Scopes
userInfoEmailScope :: Proxy '["https://www.googleapis.com/auth/userinfo.email"] Source #
View your email address
SpanScore
This is a single score for a given span of text.
See: spanScore
smart constructor.
Instances
Eq SpanScore Source # | |
Data SpanScore Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpanScore -> c SpanScore # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpanScore # toConstr :: SpanScore -> Constr # dataTypeOf :: SpanScore -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpanScore) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpanScore) # gmapT :: (forall b. Data b => b -> b) -> SpanScore -> SpanScore # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpanScore -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpanScore -> r # gmapQ :: (forall d. Data d => d -> u) -> SpanScore -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SpanScore -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpanScore -> m SpanScore # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpanScore -> m SpanScore # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpanScore -> m SpanScore # | |
Show SpanScore Source # | |
Generic SpanScore Source # | |
ToJSON SpanScore Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product | |
FromJSON SpanScore Source # | |
type Rep SpanScore Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product type Rep SpanScore = D1 (MetaData "SpanScore" "Network.Google.CommentAnalyzer.Types.Product" "gogol-commentanalyzer-0.5.0-8SuTksTsIruKQ8nHrD8kVJ" False) (C1 (MetaCons "SpanScore'" PrefixI True) (S1 (MetaSel (Just "_ssBegin") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int32))) :*: (S1 (MetaSel (Just "_ssScore") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Score)) :*: S1 (MetaSel (Just "_ssEnd") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Int32)))))) |
ssBegin :: Lens' SpanScore (Maybe Int32) Source #
"begin" and "end" describe the span of the original text that the attribute score applies to. The values are the UTF-16 codepoint range. "end" is exclusive. For example, with the text "Hi there", the begin/end pair (0,2) describes the text "Hi". If "begin" and "end" are unset, the score applies to the full text.
AnalyzeCommentResponse
data AnalyzeCommentResponse Source #
The comment analysis response message.
See: analyzeCommentResponse
smart constructor.
Instances
analyzeCommentResponse :: AnalyzeCommentResponse Source #
Creates a value of AnalyzeCommentResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
acrDetectedLanguages :: Lens' AnalyzeCommentResponse [Text] Source #
Contains the language as detected from the text content. If no language was specified in the request, the first (the most likely) language is used to select an appropriate model. Sorted in order of likelihood.
acrClientToken :: Lens' AnalyzeCommentResponse (Maybe Text) Source #
Same token from the original AnalyzeCommentRequest.
acrLanguages :: Lens' AnalyzeCommentResponse [Text] Source #
The language(s) requested by the client, as specified in the request. If the request did not specify any language, this will be empty and the detected_languages field will be populated.
acrAttributeScores :: Lens' AnalyzeCommentResponse (Maybe AnalyzeCommentResponseAttributeScores) Source #
Scores for the requested attributes. The map keys are attribute names (same as the requested_attribute field in AnalyzeCommentRequest, for example "ATTACK_ON_AUTHOR", "INFLAMMATORY", etc).
SuggestCommentScoreResponse
data SuggestCommentScoreResponse Source #
The comment score suggestion response message.
See: suggestCommentScoreResponse
smart constructor.
Instances
suggestCommentScoreResponse :: SuggestCommentScoreResponse Source #
Creates a value of SuggestCommentScoreResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
scsrDetectedLanguages :: Lens' SuggestCommentScoreResponse [Text] Source #
The list of languages detected from the comment text.
scsrClientToken :: Lens' SuggestCommentScoreResponse (Maybe Text) Source #
Same token from the original SuggestCommentScoreRequest.
scsrRequestedLanguages :: Lens' SuggestCommentScoreResponse [Text] Source #
The list of languages provided in the request.
Context
Context is typically something that a Comment is referencing or replying to (such as an article, or previous comment). Note: Populate only ONE OF the following fields. The oneof syntax cannot be used because that would require nesting entries inside another message and breaking backwards compatibility. The server will return an error if more than one of the following fields is present.
See: context
smart constructor.
Instances
Eq Context Source # | |
Data Context Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Context -> c Context # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Context # toConstr :: Context -> Constr # dataTypeOf :: Context -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Context) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Context) # gmapT :: (forall b. Data b => b -> b) -> Context -> Context # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Context -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Context -> r # gmapQ :: (forall d. Data d => d -> u) -> Context -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Context -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Context -> m Context # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Context -> m Context # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Context -> m Context # | |
Show Context Source # | |
Generic Context Source # | |
ToJSON Context Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product | |
FromJSON Context Source # | |
type Rep Context Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product type Rep Context = D1 (MetaData "Context" "Network.Google.CommentAnalyzer.Types.Product" "gogol-commentanalyzer-0.5.0-8SuTksTsIruKQ8nHrD8kVJ" False) (C1 (MetaCons "Context'" PrefixI True) (S1 (MetaSel (Just "_cEntries") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [TextEntry])) :*: S1 (MetaSel (Just "_cArticleAndParentComment") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ArticleAndParentComment)))) |
Creates a value of Context
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cEntries :: Lens' Context [TextEntry] Source #
A list of messages. For example, a linear comments section or forum thread.
cArticleAndParentComment :: Lens' Context (Maybe ArticleAndParentComment) Source #
Information about the source for which the original comment was made, and any parent comment info.
Score
Analysis scores are described by a value and a ScoreType.
See: score
smart constructor.
Instances
Eq Score Source # | |
Data Score Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Score -> c Score # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Score # dataTypeOf :: Score -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Score) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Score) # gmapT :: (forall b. Data b => b -> b) -> Score -> Score # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Score -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Score -> r # gmapQ :: (forall d. Data d => d -> u) -> Score -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Score -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Score -> m Score # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Score -> m Score # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Score -> m Score # | |
Show Score Source # | |
Generic Score Source # | |
ToJSON Score Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product | |
FromJSON Score Source # | |
type Rep Score Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product type Rep Score = D1 (MetaData "Score" "Network.Google.CommentAnalyzer.Types.Product" "gogol-commentanalyzer-0.5.0-8SuTksTsIruKQ8nHrD8kVJ" False) (C1 (MetaCons "Score'" PrefixI True) (S1 (MetaSel (Just "_sValue") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Textual Double))) :*: S1 (MetaSel (Just "_sType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ScoreType)))) |
ArticleAndParentComment
data ArticleAndParentComment Source #
A type of context specific to a comment left on a single-threaded comment message board, where comments are either a top level comment or the child of a top level comment.
See: articleAndParentComment
smart constructor.
Instances
articleAndParentComment :: ArticleAndParentComment Source #
Creates a value of ArticleAndParentComment
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
aapcArticle :: Lens' ArticleAndParentComment (Maybe TextEntry) Source #
The source content about which the comment was made (article text, article summary, video transcript, etc).
aapcParentComment :: Lens' ArticleAndParentComment (Maybe TextEntry) Source #
Refers to text that is a direct parent of the source comment, such as in a one-deep threaded message board. This field will only be present for comments that are replies to other comments and will not be populated for direct comments on the article_text.
AttributeParameters
data AttributeParameters Source #
Configurable parameters for attribute scoring.
See: attributeParameters
smart constructor.
Instances
attributeParameters :: AttributeParameters Source #
Creates a value of AttributeParameters
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
apScoreThreshold :: Lens' AttributeParameters (Maybe Double) Source #
Don't return scores for this attribute that are below this threshold. If unset, a default threshold will be applied. A FloatValue wrapper is used to distinguish between 0 vs. default/unset.
apScoreType :: Lens' AttributeParameters (Maybe AttributeParametersScoreType) Source #
What type of scores to return. If unset, defaults to probability scores.
TextEntry
Represents a body of text.
See: textEntry
smart constructor.
Instances
Eq TextEntry Source # | |
Data TextEntry Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TextEntry -> c TextEntry # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TextEntry # toConstr :: TextEntry -> Constr # dataTypeOf :: TextEntry -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TextEntry) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TextEntry) # gmapT :: (forall b. Data b => b -> b) -> TextEntry -> TextEntry # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TextEntry -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TextEntry -> r # gmapQ :: (forall d. Data d => d -> u) -> TextEntry -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TextEntry -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TextEntry -> m TextEntry # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TextEntry -> m TextEntry # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TextEntry -> m TextEntry # | |
Show TextEntry Source # | |
Generic TextEntry Source # | |
ToJSON TextEntry Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product | |
FromJSON TextEntry Source # | |
type Rep TextEntry Source # | |
Defined in Network.Google.CommentAnalyzer.Types.Product type Rep TextEntry = D1 (MetaData "TextEntry" "Network.Google.CommentAnalyzer.Types.Product" "gogol-commentanalyzer-0.5.0-8SuTksTsIruKQ8nHrD8kVJ" False) (C1 (MetaCons "TextEntry'" PrefixI True) (S1 (MetaSel (Just "_teText") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_teType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe TextEntryType)))) |
AttributeScores
data AttributeScores Source #
This holds score values for a single attribute. It contains both per-span scores as well as an overall summary score..
See: attributeScores
smart constructor.
Instances
attributeScores :: AttributeScores Source #
Creates a value of AttributeScores
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
asSummaryScore :: Lens' AttributeScores (Maybe Score) Source #
Overall score for comment as a whole.
asSpanScores :: Lens' AttributeScores [SpanScore] Source #
Per-span scores.
Xgafv
V1 error format.
Instances
ScoreType
The type of the above value.
ScoreTypeUnspecified |
|
Probability |
|
StdDevScore |
|
Percentile |
|
Raw |
|
Instances
AnalyzeCommentResponseAttributeScores
data AnalyzeCommentResponseAttributeScores Source #
Scores for the requested attributes. The map keys are attribute names (same as the requested_attribute field in AnalyzeCommentRequest, for example "ATTACK_ON_AUTHOR", "INFLAMMATORY", etc).
See: analyzeCommentResponseAttributeScores
smart constructor.
Instances
analyzeCommentResponseAttributeScores Source #
Creates a value of AnalyzeCommentResponseAttributeScores
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
acrasAddtional :: Lens' AnalyzeCommentResponseAttributeScores (HashMap Text AttributeScores) Source #
SuggestCommentScoreRequest
data SuggestCommentScoreRequest Source #
The comment score suggestion request message.
See: suggestCommentScoreRequest
smart constructor.
Instances
suggestCommentScoreRequest :: SuggestCommentScoreRequest Source #
Creates a value of SuggestCommentScoreRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sClientToken :: Lens' SuggestCommentScoreRequest (Maybe Text) Source #
Opaque token that is echoed from the request to the response.
sLanguages :: Lens' SuggestCommentScoreRequest [Text] Source #
The language(s) of the comment and context (if none are specified, the language is automatically detected). If multiple languages are specified, the text is checked in all of them that are supported. Both ISO and BCP-47 language codes are accepted. Current Language Restrictions: * Only English text ("en") is supported. If none of the languages specified by the caller are supported, an `UNIMPLEMENTED` error is returned.
sAttributeScores :: Lens' SuggestCommentScoreRequest (Maybe SuggestCommentScoreRequestAttributeScores) Source #
Attribute scores for the comment. The map keys are attribute names, same as the requested_attribute field in AnalyzeCommentRequest (for example "ATTACK_ON_AUTHOR", "INFLAMMATORY", etc.). This field has the same type as the `attribute_scores` field in AnalyzeCommentResponse. To specify an overall attribute score for the entire comment as a whole, use the `summary_score` field of the mapped AttributeScores object. To specify scores on specific subparts of the comment, use the `span_scores` field. All SpanScore objects must have begin and end fields set. All Score objects must be explicitly set (for binary classification, use the score values 0 and 1). If Score objects don't include a ScoreType, `PROBABILITY` is assumed. `attribute_scores` must not be empty. The mapped AttributeScores objects also must not be empty. An `INVALID_ARGUMENT` error is returned for all malformed requests.
sSessionId :: Lens' SuggestCommentScoreRequest (Maybe Text) Source #
Session ID. Used to join related RPCs into a single session. For example, an interactive tool that calls both the AnalyzeComment and SuggestCommentScore RPCs should set all invocations of both RPCs to the same Session ID, typically a random 64-bit integer.
sCommUnityId :: Lens' SuggestCommentScoreRequest (Maybe Text) Source #
Optional identifier associating this comment score suggestion with a particular sub-community. Different communities may have different norms and rules. Specifying this value enables training community-specific models.
AttributeParametersScoreType
data AttributeParametersScoreType Source #
What type of scores to return. If unset, defaults to probability scores.
APSTScoreTypeUnspecified |
|
APSTProbability |
|
APSTStdDevScore |
|
APSTPercentile |
|
APSTRaw |
|
Instances
AnalyzeCommentRequest
data AnalyzeCommentRequest Source #
The comment analysis request message.
See: analyzeCommentRequest
smart constructor.
Instances
analyzeCommentRequest :: AnalyzeCommentRequest Source #
Creates a value of AnalyzeCommentRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
aClientToken :: Lens' AnalyzeCommentRequest (Maybe Text) Source #
Opaque token that is echoed from the request to the response.
aSpanAnnotations :: Lens' AnalyzeCommentRequest (Maybe Bool) Source #
An advisory parameter that will return span annotations if the model is capable of providing scores with sub-comment resolution. This will likely increase the size of the returned message.
aDoNotStore :: Lens' AnalyzeCommentRequest (Maybe Bool) Source #
Do not store the comment or context sent in this request. By default, the service may store comments/context for debugging purposes.
aLanguages :: Lens' AnalyzeCommentRequest [Text] Source #
The language(s) of the comment and context (if none are specified, the language is automatically detected). If multiple languages are specified, the text is checked in all of them that are supported. Both ISO and BCP-47 language codes are accepted. Current Language Restrictions: * Only English text ("en") is supported. If none of the languages specified by the caller are supported, an `UNIMPLEMENTED` error is returned.
aRequestedAttributes :: Lens' AnalyzeCommentRequest (Maybe AnalyzeCommentRequestRequestedAttributes) Source #
Specification of requested attributes. The AttributeParameters serve as configuration for each associated attribute. The map keys are attribute names. The following attributes are available: "ATTACK_ON_AUTHOR" - Attack on author of original article or post. "ATTACK_ON_COMMENTER" - Attack on fellow commenter. "ATTACK_ON_PUBLISHER" - Attack on publisher of article/post. "INCOHERENT" - Difficult to understand, nonsensical. "INFLAMMATORY" - Intending to provoke or inflame. "OBSCENE" - Obscene, such as cursing. "OFF_TOPIC" - Not related to the original topic. "SPAM" - Commercial/advertising spam content. "UNSUBSTANTIAL" - Trivial.
aSessionId :: Lens' AnalyzeCommentRequest (Maybe Text) Source #
Session ID. Used to join related RPCs into a single session. For example, an interactive tool that calls both the AnalyzeComment and SuggestCommentScore RPCs should set all invocations of both RPCs to the same Session ID, typically a random 64-bit integer.
aCommUnityId :: Lens' AnalyzeCommentRequest (Maybe Text) Source #
Optional identifier associating this AnalyzeCommentRequest with a particular client's community. Different communities may have different norms and rules. Specifying this value enables us to explore building community-specific models for clients.
SuggestCommentScoreRequestAttributeScores
data SuggestCommentScoreRequestAttributeScores Source #
Attribute scores for the comment. The map keys are attribute names, same as the requested_attribute field in AnalyzeCommentRequest (for example "ATTACK_ON_AUTHOR", "INFLAMMATORY", etc.). This field has the same type as the `attribute_scores` field in AnalyzeCommentResponse. To specify an overall attribute score for the entire comment as a whole, use the `summary_score` field of the mapped AttributeScores object. To specify scores on specific subparts of the comment, use the `span_scores` field. All SpanScore objects must have begin and end fields set. All Score objects must be explicitly set (for binary classification, use the score values 0 and 1). If Score objects don't include a ScoreType, `PROBABILITY` is assumed. `attribute_scores` must not be empty. The mapped AttributeScores objects also must not be empty. An `INVALID_ARGUMENT` error is returned for all malformed requests.
See: suggestCommentScoreRequestAttributeScores
smart constructor.
Instances
suggestCommentScoreRequestAttributeScores Source #
Creates a value of SuggestCommentScoreRequestAttributeScores
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
scsrasAddtional :: Lens' SuggestCommentScoreRequestAttributeScores (HashMap Text AttributeScores) Source #
AnalyzeCommentRequestRequestedAttributes
data AnalyzeCommentRequestRequestedAttributes Source #
Specification of requested attributes. The AttributeParameters serve as configuration for each associated attribute. The map keys are attribute names. The following attributes are available: "ATTACK_ON_AUTHOR" - Attack on author of original article or post. "ATTACK_ON_COMMENTER" - Attack on fellow commenter. "ATTACK_ON_PUBLISHER" - Attack on publisher of article/post. "INCOHERENT" - Difficult to understand, nonsensical. "INFLAMMATORY" - Intending to provoke or inflame. "OBSCENE" - Obscene, such as cursing. "OFF_TOPIC" - Not related to the original topic. "SPAM" - Commercial/advertising spam content. "UNSUBSTANTIAL" - Trivial.
See: analyzeCommentRequestRequestedAttributes
smart constructor.
Instances
analyzeCommentRequestRequestedAttributes Source #
Creates a value of AnalyzeCommentRequestRequestedAttributes
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
acrraAddtional :: Lens' AnalyzeCommentRequestRequestedAttributes (HashMap Text AttributeParameters) Source #
TextEntryType
data TextEntryType Source #
Type of the text field.
TextTypeUnspecified |
|
PlainText |
|
HTML |
|