Share via


TargetSentiment 類別

TargetSentiment 包含預測情感、信賴分數,以及產品/服務重要元件的其他資訊。 例如,「Hotel Foo 的食物良好」,「food」 是 「Hotel Foo」 的重要元件。

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

建構函式

TargetSentiment(**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

'positive' 和 'negative' 標籤目標介於 0 到 1 之間的情感信賴分數。 「中性」的分數一律為 0

confidence_scores: SentimentConfidenceScores

length

目標文字長度。 此值取決於原始要求中所設定 string_index_type 參數的值,預設為 UnicodeCodePoints。

length: int

offset

檔開頭的目標文字位移。 此值取決於原始要求中所設定 string_index_type 參數的值,預設為 UnicodeCodePoints。

offset: int

sentiment

目標的預測情感。 可能的值包括 'positive'、'mixed' 和 'negative'。

sentiment: str

text

目標的文字值。

text: str