Share via


AssessmentSentiment 類別

AssessmentSentiment 包含有關特定目標之評定的預測情感、信賴分數和其他相關資訊。 例如,在「食物良好」一句中,目標 'food' 的評量是 'good'。

繼承
azure.ai.textanalytics._dict_mixin.DictMixin
AssessmentSentiment

建構函式

AssessmentSentiment(**kwargs: Any)

方法

get
has_key
items
keys
update
values

get

get(key: str, default: Any | None = None) -> Any

參數

名稱 Description
key
必要
default
預設值: None

has_key

has_key(k: str) -> bool

參數

名稱 Description
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