SentimentDocumentResult¶
-
class
oci.ai_language.models.
SentimentDocumentResult
(**kwargs)¶ Bases:
object
The document response for sentiment detect call.
Methods
__init__
(**kwargs)Initializes a new SentimentDocumentResult object with values from keyword arguments. Attributes
aspects
[Required] Gets the aspects of this SentimentDocumentResult. document_scores
Gets the document_scores of this SentimentDocumentResult. document_sentiment
Gets the document_sentiment of this SentimentDocumentResult. key
[Required] Gets the key of this SentimentDocumentResult. language_code
[Required] Gets the language_code of this SentimentDocumentResult. sentences
Gets the sentences of this SentimentDocumentResult. -
__init__
(**kwargs)¶ Initializes a new SentimentDocumentResult object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - key (str) – The value to assign to the key property of this SentimentDocumentResult.
- document_sentiment (str) – The value to assign to the document_sentiment property of this SentimentDocumentResult.
- document_scores (dict(str, float)) – The value to assign to the document_scores property of this SentimentDocumentResult.
- aspects (list[oci.ai_language.models.SentimentAspect]) – The value to assign to the aspects property of this SentimentDocumentResult.
- sentences (list[oci.ai_language.models.SentimentSentence]) – The value to assign to the sentences property of this SentimentDocumentResult.
- language_code (str) – The value to assign to the language_code property of this SentimentDocumentResult.
-
aspects
¶ [Required] Gets the aspects of this SentimentDocumentResult. List of detected aspects sentiment.
Returns: The aspects of this SentimentDocumentResult. Return type: list[oci.ai_language.models.SentimentAspect]
-
document_scores
¶ Gets the document_scores of this SentimentDocumentResult. Scores for each sentiment. Example: {“positive”: 1.0, “negative”: 0.0}
Returns: The document_scores of this SentimentDocumentResult. Return type: dict(str, float)
-
document_sentiment
¶ Gets the document_sentiment of this SentimentDocumentResult. Document level sentiment.
Returns: The document_sentiment of this SentimentDocumentResult. Return type: str
-
key
¶ [Required] Gets the key of this SentimentDocumentResult. Document unique identifier defined by the user.
Returns: The key of this SentimentDocumentResult. Return type: str
-
language_code
¶ [Required] Gets the language_code of this SentimentDocumentResult. Language code supported - auto : Automatically detect language - ar : Arabic - pt-BR : Brazilian Portuguese - cs : Czech - da : Danish - nl : Dutch - en : English - fi : Finnish - fr : French - fr-CA : Canadian French - de : German - it : Italian - ja : Japanese - ko : Korean - no : Norwegian - pl : Polish - ro : Romanian - zh-CN : Simplified Chinese - es : Spanish - sv : Swedish - zh-TW : Traditional Chinese - tr : Turkish - el : Greek - he : Hebrew
Returns: The language_code of this SentimentDocumentResult. Return type: str
-
sentences
¶ Gets the sentences of this SentimentDocumentResult. List of detected sentences sentiment.
Returns: The sentences of this SentimentDocumentResult. Return type: list[oci.ai_language.models.SentimentSentence]
-