你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AssessmentSentiment 类
AssessmentSentiment 包含预测的情绪、置信度分数以及有关给定特定目标的评估的其他信息。 例如,在句子“食物很好”中,目标“食物”的评估是“好”。
- 继承
-
azure.ai.textanalytics._dict_mixin.DictMixinAssessmentSentiment
构造函数
AssessmentSentiment(**kwargs: Any)
方法
get | |
has_key | |
items | |
keys | |
update | |
values |
get
get(key: str, default: Any | None = None) -> Any
参数
名称 | 说明 |
---|---|
key
必需
|
|
default
|
默认值: None
|
has_key
has_key(k: str) -> bool
参数
名称 | 说明 |
---|---|
k
必需
|
|
items
items() -> Iterable[Tuple[str, Any]]
keys
keys() -> Iterable[str]
update
update(*args: Any, **kwargs: Any) -> None
values
values() -> Iterable[Any]
属性
confidence_scores
“积极”和“负面”标签评估的情绪置信度分数介于 0 和 1 之间。 “中性”的分数始终为 0
confidence_scores: SentimentConfidenceScores
is_negated
评估的值是否被否定。 例如,在“食物不好”中,评估“好”被否定。
is_negated: bool
length
评估文本长度。 此值取决于原始请求中设置的 string_index_type 参数的值,默认情况下为 UnicodeCodePoints。
length: int
offset
评估文本与文档开头的偏移量。 该值取决于原始请求中设置的 string_index_type 参数的值,默认情况下为 UnicodeCodePoints。
offset: int
sentiment
评估的预测情绪。 可能的值包括“positive”、“mixed”和“negative”。
sentiment: str
text
评估文本。
text: str