SentimentAspect¶
-
class
oci.ai_language.models.SentimentAspect(**kwargs)¶ Bases:
objectSentiment aspect object.
Methods
__init__(**kwargs)Initializes a new SentimentAspect object with values from keyword arguments. Attributes
lengthGets the length of this SentimentAspect. offsetGets the offset of this SentimentAspect. scoresGets the scores of this SentimentAspect. sentimentGets the sentiment of this SentimentAspect. textGets the text of this SentimentAspect. -
__init__(**kwargs)¶ Initializes a new SentimentAspect object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - offset (int) – The value to assign to the offset property of this SentimentAspect.
- length (int) – The value to assign to the length property of this SentimentAspect.
- text (str) – The value to assign to the text property of this SentimentAspect.
- sentiment (str) – The value to assign to the sentiment property of this SentimentAspect.
- scores (dict(str, float)) – The value to assign to the scores property of this SentimentAspect.
-
length¶ Gets the length of this SentimentAspect. Length of aspect text.
Returns: The length of this SentimentAspect. Return type: int
-
offset¶ Gets the offset of this SentimentAspect. The number of Unicode code points preceding this entity in the submitted text.
Returns: The offset of this SentimentAspect. Return type: int
-
scores¶ Gets the scores of this SentimentAspect. Scores or confidences for each sentiment. Example: {“positive”: 1.0, “negative”: 0.0}
Returns: The scores of this SentimentAspect. Return type: dict(str, float)
-
sentiment¶ Gets the sentiment of this SentimentAspect. The highest-score sentiment for the aspect text.
Returns: The sentiment of this SentimentAspect. Return type: str
-
text¶ Gets the text of this SentimentAspect. Aspect text.
Returns: The text of this SentimentAspect. Return type: str
-