REST Resource: projects.locations.conversations.analyses

資源:分析

分析資源。

JSON 表示法
{
  "name": string,
  "requestTime": string,
  "createTime": string,
  "analysisResult": {
    object (AnalysisResult)
  },
  "annotatorSelector": {
    object (AnnotatorSelector)
  },
  "satisfiesPzi": boolean,
  "satisfiesPzs": boolean
}
欄位
name

string

不可變動。分析的資源名稱。格式:projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}

requestTime

string (Timestamp format)

僅供輸出。要求分析的時間。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

createTime

string (Timestamp format)

僅供輸出。分析作業的建立時間,也就是長時間執行的作業完成時。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

analysisResult

object (AnalysisResult)

僅供輸出。分析結果,會在分析完成時填入。

annotatorSelector

object (AnnotatorSelector)

選取要執行的註解器和要使用的詞組比對器 (如有)。如未指定,系統會執行所有註解器。

satisfiesPzi

boolean

僅供輸出。這項資源是否為可用區隔離。

satisfiesPzs

boolean

僅供輸出。這項資源是否依可用區分隔。

AnalysisResult

分析結果。

JSON 表示法
{
  "endTime": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "callAnalysisMetadata": {
    object (CallAnalysisMetadata)
  }
  // End of mutually exclusive fields.
}
欄位
endTime

string (Timestamp format)

分析結束的時間。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

分析期間發現的中繼資料。以下是互斥欄位清單。回應中最多會設定下列其中一個欄位:
callAnalysisMetadata

object (CallAnalysisMetadata)

分析建立的通話專屬中繼資料。

互斥欄位結束。

CallAnalysisMetadata

分析期間建立的通話專屬中繼資料。

JSON 表示法
{
  "annotations": [
    {
      object (CallAnnotation)
    }
  ],
  "entities": {
    string: {
      object (Entity)
    },
    ...
  },
  "sentiments": [
    {
      object (ConversationLevelSentiment)
    }
  ],
  "silence": {
    object (ConversationLevelSilence)
  },
  "intents": {
    string: {
      object (Intent)
    },
    ...
  },
  "phraseMatchers": {
    string: {
      object (PhraseMatchData)
    },
    ...
  },
  "issueModelResult": {
    object (IssueModelResult)
  },
  "qaScorecardResults": [
    {
      object (QaScorecardResult)
    }
  ]
}
欄位
annotations[]

object (CallAnnotation)

適用於這項通話的通話註解清單。

entities

map (key: string, value: object (Entity))

通話中的所有實體。

包含 "key": value 組合清單的物件,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

sentiments[]

object (ConversationLevelSentiment)

通話中每個管道的整體對話層級情緒。

silence

object (ConversationLevelSilence)

通話期間,整體對話層級的無聲時間。

intents

map (key: string, value: object (Intent))

通話中所有相符的意圖。

包含 "key": value 組合清單的物件,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

phraseMatchers

map (key: string, value: object (PhraseMatchData))

通話中所有相符的詞組比對器。

包含 "key": value 組合清單的物件,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

issueModelResult

object (IssueModelResult)

整體對話層級問題建模結果。

qaScorecardResults[]

object (QaScorecardResult)

QaScorecards 的評分結果。

CallAnnotation

適用於通話視窗的中繼資料。

JSON 表示法
{
  "channelTag": integer,
  "annotationStartBoundary": {
    object (AnnotationBoundary)
  },
  "annotationEndBoundary": {
    object (AnnotationBoundary)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "interruptionData": {
    object (InterruptionData)
  },
  "sentimentData": {
    object (SentimentData)
  },
  "silenceData": {
    object (SilenceData)
  },
  "holdData": {
    object (HoldData)
  },
  "entityMentionData": {
    object (EntityMentionData)
  },
  "intentMatchData": {
    object (IntentMatchData)
  },
  "phraseMatchData": {
    object (PhraseMatchData)
  },
  "issueMatchData": {
    object (IssueMatchData)
  }
  // End of mutually exclusive fields.
}
欄位
channelTag

integer

發生註解的音訊聲道。如果是單聲道音訊,這個欄位會留空。

annotationStartBoundary

object (AnnotationBoundary)

對話中註解開始的邊界 (含)。

annotationEndBoundary

object (AnnotationBoundary)

對話中註解結束的邊界 (含)。

註解中的資料。以下是互斥欄位清單。回應中最多會設定下列其中一個欄位:
interruptionData

object (InterruptionData)

指定中斷的資料。

sentimentData

object (SentimentData)

指定情緒的資料。

silenceData

object (SilenceData)

指定靜音的資料。

holdData

object (HoldData)

指定訴訟保留的資料。

entityMentionData

object (EntityMentionData)

指定實體提及的資料。

intentMatchData

object (IntentMatchData)

指定意圖比對的資料。

phraseMatchData

object (PhraseMatchData)

指定詞組比對的資料。

issueMatchData

object (IssueMatchData)

指定問題比對的資料。

互斥欄位結束。

InterruptionData

這個類型沒有任何欄位。

中斷註解的資料。

SilenceData

這個類型沒有任何欄位。

靜音註解的資料。

HoldData

這個類型沒有任何欄位。

封存註解的資料。

EntityMentionData

實體提及註解的資料。這代表在對話中提及Entity。

JSON 表示法
{
  "entityUniqueId": string,
  "type": enum (MentionType),
  "sentiment": {
    object (SentimentData)
  }
}
欄位
entityUniqueId

string

對話實體中這個實體的鍵。可用於擷取與這則提及內容連結的確切 Entity。

type

enum (MentionType)

實體提及的類型。

sentiment

object (SentimentData)

提及實體時表達的情緒。

MentionType

支援的提及類型。

列舉
MENTION_TYPE_UNSPECIFIED 未指定。
PROPER 專有名詞。
COMMON 普通名詞 (或複合名詞)。

IntentMatchData

意圖比對的資料。代表對話中文字區段的意圖比對。文字片段可以是句子的一部分、完整句子,或包含多個句子的語句。

JSON 表示法
{
  "intentUniqueId": string
}
欄位
intentUniqueId

string

相符意圖的 ID。可用於擷取對應的意圖資訊。

PhraseMatchData

相符詞組比對器的資料。代表指定比對的詞組比對器識別資訊。

JSON 表示法
{
  "phraseMatcher": string,
  "displayName": string
}
欄位
phraseMatcher

string

詞組比對器的專屬 ID (資源名稱)。

displayName

string

詞組比對器的人類可讀名稱。

IssueMatchData

問題比對註解的資料。

JSON 表示法
{
  "issueAssignment": {
    object (IssueAssignment)
  }
}
欄位
issueAssignment

object (IssueAssignment)

問題指派相關資訊。

IssueAssignment

問題相關資訊。

JSON 表示法
{
  "issue": string,
  "score": number,
  "displayName": string
}
欄位
issue

string

指派問題的資源名稱。

score

number

表示問題指派可能性的分數,目前範圍為 [0,1]。

displayName

string

不可變動。指派問題的顯示名稱。這個欄位會在分析時設定,之後即無法變更。

實體

實體註解的資料。代表對話中已知實體的詞組,例如人物、機構或位置。

JSON 表示法
{
  "displayName": string,
  "type": enum (Type),
  "metadata": {
    string: string,
    ...
  },
  "salience": number,
  "sentiment": {
    object (SentimentData)
  }
}
欄位
displayName

string

實體的代表名稱。

type

enum (Type)

實體類型。

metadata

map (key: string, value: string)

與實體相關聯的中繼資料。

對於大多數實體類型,中繼資料是維基百科網址 (wikipedia_url) 和知識圖譜 MID (mid) (如有)。如需其他實體類型的相關中繼資料,請參閱下方的「類型」表格。

包含 "key": value 組合清單的物件,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

salience

number

與實體相關聯的顯著性分數,範圍為 [0, 1.0]。

實體的顯著性分數可提供該實體對整份文件文字的重要程度或核心程度。分數越接近 0,代表顯著性越低;分數越接近 1.0,代表顯著性越高。

sentiment

object (SentimentData)

對話中對這個實體表達的整體情緒。

類型

實體類型。對於大多數實體類型,相關聯的中繼資料是維基百科網址 (wikipedia_url) 和知識圖譜 MID (mid)。下表列出具有不同中繼資料的實體相關聯欄位。

列舉
TYPE_UNSPECIFIED 未指定。
PERSON Person。
LOCATION 位置。
ORGANIZATION 彙整:
EVENT 事件。
WORK_OF_ART 圖片。
CONSUMER_GOOD 消費性產品。
OTHER 其他類型的實體。
PHONE_NUMBER

電話號碼。

中繼資料會列出電話號碼 (格式取決於地方慣例),以及文字中顯示的其他元素:

  • number:實際號碼,根據當地慣例分成多個部分。
  • national_prefix:國家/地區代碼 (如有偵測到)。
  • area_code:偵測到的區域或區碼。
  • extension - 電話分機號碼 (接通後撥號),如有偵測到。
ADDRESS

地址.

中繼資料會識別門牌號碼和地區,以及文字中顯示的其他元素:

  • street_number - 門牌號碼。
  • locality - 城市或鄉鎮。
  • street_name:街道/路線名稱 (如有偵測到)。
  • postal_code - 郵遞區號 (如有偵測到)。
  • country:國家/地區 (如偵測到)。
  • broad_region - 行政區,例如州 (如有偵測到)。
  • narrow_region:較小的行政區,例如郡 (如有偵測到)。
  • sublocality:用於亞洲地址,標示城市內的行政區 (如有偵測到)。
DATE

日期。

中繼資料會識別日期的組成部分:

  • year:四位數年份 (如有偵測到)。
  • month:兩位數的月份 (如有偵測到)。
  • day:兩位數的日期 (如有偵測到)。
NUMBER

數字。

中繼資料就是數字本身。

PRICE

價格。

中繼資料會識別 value 和 currency。

ConversationLevelSentiment

對話層級情緒資料的一個管道。

JSON 表示法
{
  "channelTag": integer,
  "sentimentData": {
    object (SentimentData)
  }
}
欄位
channelTag

integer

資料適用的音訊聲道。

sentimentData

object (SentimentData)

指定情緒的資料。

ConversationLevelSilence

對話層級的靜音資料。

JSON 表示法
{
  "silenceDuration": string,
  "silencePercentage": number
}
欄位
silenceDuration

string (Duration format)

計算出的靜音時間。

以秒為單位的時間長度,最多 9 個小數位數,結尾為「s」。例如:"3.5s"。

silencePercentage

number

靜音時間占總對話時間的百分比。

Intent

意圖的資料。代表在對話中偵測到的意圖,例如 MAKES_PROMISE。

JSON 表示法
{
  "id": string,
  "displayName": string
}
欄位
id

string

意圖的專屬 ID。

displayName

string

人類可讀的意圖名稱。

IssueModelResult

對話的問題建模結果。

JSON 表示法
{
  "issueModel": string,
  "issues": [
    {
      object (IssueAssignment)
    }
  ]
}
欄位
issueModel

string

生成結果的問題模型。格式:projects/{project}/locations/{location}/issueModels/{issueModel}

issues[]

object (IssueAssignment)

所有相符的問題。

QaScorecardResult

根據 QaScorecard 為單一對話評分的結果。包含 QaAnswers 集合和匯總分數。

JSON 表示法
{
  "name": string,
  "qaScorecardRevision": string,
  "conversation": string,
  "createTime": string,
  "agentId": string,
  "qaAnswers": [
    {
      object (QaAnswer)
    }
  ],
  "qaTagResults": [
    {
      object (QaTagResult)
    }
  ],
  "scoreSources": [
    {
      object (ScoreSource)
    }
  ],
  "score": number,
  "potentialScore": number,
  "normalizedScore": number
}
欄位
name

string

ID。評量表結果的名稱。格式:projects/{project}/locations/{location}/qaScorecardResults/{qa_scorecard_result}

qaScorecardRevision

string

這項結果評分的 QaScorecardRevision。

conversation

string

這項結果評分的對話。

createTime

string (Timestamp format)

僅供輸出。修訂版本的建立時間戳記。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z"、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30"。

agentId

string

處理對話的代理 ID。

qaAnswers[]

object (QaAnswer)

結果中呈現的一組 QaAnswers。

qaTagResults[]

object (QaTagResult)

標記及其分數的集合。

scoreSources[]

object (ScoreSource)

所有個別分數組合的清單。

score

number

結果的整體數值分數,包含任何手動編輯內容 (如有)。

potentialScore

number

評量表的潛在整體分數上限。使用 naValue 回答的問題不會計入。

normalizedScore

number

正規化分數,即分數除以可能提升分數。如有任何手動編輯內容,也會一併納入。

QaAnswer

QaQuestion 的答案。

JSON 表示法
{
  "qaQuestion": string,
  "conversation": string,
  "questionBody": string,
  "answerValue": {
    object (AnswerValue)
  },
  "tags": [
    string
  ],
  "answerSources": [
    {
      object (AnswerSource)
    }
  ]
}
欄位
qaQuestion

string

這個答案回答的 QaQuestion。

conversation

string

答案適用的對話。

questionBody

string

問題文字。例如:「服務專員是否向顧客問候?」

answerValue

object (AnswerValue)

這個來源的答案值。系統預設會填入這個欄位,除非問題設有傳回多個答案值的選取策略,在這種情況下,系統會改為填入 answerValues。

tags[]

string

使用者定義的任意標記清單。與 QaScorecard.ScorecardQuestion.tags 的值相符。用於分組/整理,以及為每個答案的分數加權。

answerSources[]

object (AnswerSource)

列出所有包含一或多個特定來源類型答案值的答案來源,例如所有系統產生的答案來源,或所有手動編輯的答案來源。

AnswerSource

一個問題可能有多個來自不同來源的答案,其中一個會成為上方的「主要」答案。AnswerSource 代表每個答案。

JSON 表示法
{
  "sourceType": enum (SourceType),
  "answerValue": {
    object (AnswerValue)
  }
}
欄位
sourceType

enum (SourceType)

答案的生成來源。

answerValue

object (AnswerValue)

這個來源的答案值。系統預設會填入這個欄位,除非問題設有傳回多個答案值的選取策略,在這種情況下,系統會改為填入 answerValues。

SourceType

答案的生成來源。

列舉
SOURCE_TYPE_UNSPECIFIED 未指定來源類型。
SYSTEM_GENERATED 答案由系統生成,在洞察分析期間建立。
MANUAL_EDIT 答案是由真人手動編輯建立。

QaTagResult

標記和對應結果。

JSON 表示法
{
  "tag": string,
  "score": number,
  "potentialScore": number,
  "normalizedScore": number
}
欄位
tag

string

分數適用的標記。

score

number

標記適用的分數。

potentialScore

number

標記適用的潛在分數。

normalizedScore

number

標記適用的正規化分數。

ScoreSource

評量表結果可能包含多組來自不同來源的分數,其中一組會成為上述的「主要」答案。ScoreSource 代表每組分數。

JSON 表示法
{
  "sourceType": enum (SourceType),
  "qaTagResults": [
    {
      object (QaTagResult)
    }
  ],
  "score": number,
  "potentialScore": number,
  "normalizedScore": number
}
欄位
sourceType

enum (SourceType)

分數的計算依據。

qaTagResults[]

object (QaTagResult)

標記及其分數的集合。

score

number

結果的整體數值分數。

potentialScore

number

評量表的潛在整體分數上限。使用 naValue 回答的問題不會計入。

normalizedScore

number

正規化分數,即分數除以可能提升分數。

SourceType

分數的計算依據。

列舉
SOURCE_TYPE_UNSPECIFIED 未指定來源類型。
SYSTEM_GENERATED_ONLY 分數僅依據系統生成的答案計算。
INCLUDES_MANUAL_EDITS 分數是根據系統生成的答案計算得出,並包含任何手動編輯內容 (如有)。

方法

create

建立分析。

delete

刪除分析。

get

取得分析。

list

列出分析。