REST Resource: projects.locations.conversations.analyses

Resource: Analysis

The analysis resource.

JSON representation
{
  "name": string,
  "requestTime": string,
  "createTime": string,
  "analysisResult": {
    object (AnalysisResult)
  },
  "annotatorSelector": {
    object (AnnotatorSelector)
  }
}
Fields
name

string

Immutable. The resource name of the analysis. Format: projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}

requestTime

string (Timestamp format)

Output only. The time at which the analysis was requested.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

createTime

string (Timestamp format)

Output only. The time at which the analysis was created, which occurs when the long-running operation completes.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

analysisResult

object (AnalysisResult)

Output only. The result of the analysis, which is populated when the analysis finishes.

annotatorSelector

object (AnnotatorSelector)

To select the annotators to run and the phrase matchers to use (if any). If not specified, all annotators will be run.

AnalysisResult

The result of an analysis.

JSON representation
{
  "endTime": string,

  // Union field metadata can be only one of the following:
  "callAnalysisMetadata": {
    object (CallAnalysisMetadata)
  }
  // End of list of possible types for union field metadata.
}
Fields
endTime

string (Timestamp format)

The time at which the analysis ended.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Union field metadata. Metadata discovered during analysis. metadata can be only one of the following:
callAnalysisMetadata

object (CallAnalysisMetadata)

Call-specific metadata created by the analysis.

CallAnalysisMetadata

Call-specific metadata created during analysis.

JSON representation
{
  "annotations": [
    {
      object (CallAnnotation)
    }
  ],
  "entities": {
    string: {
      object (Entity)
    },
    ...
  },
  "sentiments": [
    {
      object (ConversationLevelSentiment)
    }
  ],
  "intents": {
    string: {
      object (Intent)
    },
    ...
  },
  "phraseMatchers": {
    string: {
      object (PhraseMatchData)
    },
    ...
  },
  "issueModelResult": {
    object (IssueModelResult)
  }
}
Fields
annotations[]

object (CallAnnotation)

A list of call annotations that apply to this call.

entities

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

All the entities in the call.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

sentiments[]

object (ConversationLevelSentiment)

Overall conversation-level sentiment for each channel of the call.

intents

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

All the matched intents in the call.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

phraseMatchers

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

All the matched phrase matchers in the call.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

issueModelResult

object (IssueModelResult)

Overall conversation-level issue modeling result.

CallAnnotation

A piece of metadata that applies to a window of a call.

JSON representation
{
  "channelTag": integer,
  "annotationStartBoundary": {
    object (AnnotationBoundary)
  },
  "annotationEndBoundary": {
    object (AnnotationBoundary)
  },

  // Union field data can be only one of the following:
  "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 list of possible types for union field data.
}
Fields
channelTag

integer

The channel of the audio where the annotation occurs. For single-channel audio, this field is not populated.

annotationStartBoundary

object (AnnotationBoundary)

The boundary in the conversation where the annotation starts, inclusive.

annotationEndBoundary

object (AnnotationBoundary)

The boundary in the conversation where the annotation ends, inclusive.

Union field data. The data in the annotation. data can be only one of the following:
interruptionData

object (InterruptionData)

Data specifying an interruption.

sentimentData

object (SentimentData)

Data specifying sentiment.

silenceData

object (SilenceData)

Data specifying silence.

holdData

object (HoldData)

Data specifying a hold.

entityMentionData

object (EntityMentionData)

Data specifying an entity mention.

intentMatchData

object (IntentMatchData)

Data specifying an intent match.

phraseMatchData

object (PhraseMatchData)

Data specifying a phrase match.

issueMatchData

object (IssueMatchData)

Data specifying an issue match.

InterruptionData

This type has no fields.

The data for an interruption annotation.

SilenceData

This type has no fields.

The data for a silence annotation.

HoldData

This type has no fields.

The data for a hold annotation.

EntityMentionData

The data for an entity mention annotation. This represents a mention of an Entity in the conversation.

JSON representation
{
  "entityUniqueId": string,
  "type": enum (MentionType),
  "sentiment": {
    object (SentimentData)
  }
}
Fields
entityUniqueId

string

The key of this entity in conversation entities. Can be used to retrieve the exact Entity this mention is attached to.

type

enum (MentionType)

The type of the entity mention.

sentiment

object (SentimentData)

Sentiment expressed for this mention of the entity.

MentionType

The supported types of mentions.

Enums
MENTION_TYPE_UNSPECIFIED Unspecified.
PROPER Proper noun.
COMMON Common noun (or noun compound).

IntentMatchData

The data for an intent match. Represents an intent match for a text segment in the conversation. A text segment can be part of a sentence, a complete sentence, or an utterance with multiple sentences.

JSON representation
{
  "intentUniqueId": string
}
Fields
intentUniqueId

string

The id of the matched intent. Can be used to retrieve the corresponding intent information.

PhraseMatchData

The data for a matched phrase matcher. Represents information identifying a phrase matcher for a given match.

JSON representation
{
  "phraseMatcher": string,
  "displayName": string
}
Fields
phraseMatcher

string

The unique identifier (the resource name) of the phrase matcher.

displayName

string

The human-readable name of the phrase matcher.

IssueMatchData

The data for an issue match annotation.

JSON representation
{
  "issueAssignment": {
    object (IssueAssignment)
  }
}
Fields
issueAssignment

object (IssueAssignment)

Information about the issue's assignment.

IssueAssignment

Information about the issue.

JSON representation
{
  "issue": string,
  "score": number,
  "displayName": string
}
Fields
issue

string

Resource name of the assigned issue.

score

number

Score indicating the likelihood of the issue assignment. currently bounded on [0,1].

displayName

string

Immutable. Display name of the assigned issue. This field is set at time of analyis and immutable since then.

Entity

The data for an entity annotation. Represents a phrase in the conversation that is a known entity, such as a person, an organization, or location.

JSON representation
{
  "displayName": string,
  "type": enum (Type),
  "metadata": {
    string: string,
    ...
  },
  "salience": number,
  "sentiment": {
    object (SentimentData)
  }
}
Fields
displayName

string

The representative name for the entity.

type

enum (Type)

The entity type.

metadata

map (key: string, value: string)

Metadata associated with the entity.

For most entity types, the metadata is a Wikipedia URL (wikipedia_url) and Knowledge Graph MID (mid), if they are available. For the metadata associated with other entity types, see the Type table below.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

salience

number

The salience score associated with the entity in the [0, 1.0] range.

The salience score for an entity provides information about the importance or centrality of that entity to the entire document text. Scores closer to 0 are less salient, while scores closer to 1.0 are highly salient.

sentiment

object (SentimentData)

The aggregate sentiment expressed for this entity in the conversation.

Type

The type of the entity. For most entity types, the associated metadata is a Wikipedia URL (wikipedia_url) and Knowledge Graph MID (mid). The table below lists the associated fields for entities that have different metadata.

Enums
TYPE_UNSPECIFIED Unspecified.
PERSON Person.
LOCATION Location.
ORGANIZATION Organization.
EVENT Event.
WORK_OF_ART Artwork.
CONSUMER_GOOD Consumer product.
OTHER Other types of entities.
PHONE_NUMBER

Phone number.

The metadata lists the phone number (formatted according to local convention), plus whichever additional elements appear in the text:

  • number - The actual number, broken down into sections according to local convention.
  • national_prefix - Country code, if detected.
  • area_code - Region or area code, if detected.
  • extension - Phone extension (to be dialed after connection), if detected.
ADDRESS

Address.

The metadata identifies the street number and locality plus whichever additional elements appear in the text:

  • street_number - Street number.
  • locality - City or town.
  • street_name - Street/route name, if detected.
  • postal_code - Postal code, if detected.
  • country - Country, if detected.
  • broad_region - Administrative area, such as the state, if detected.
  • narrow_region - Smaller administrative area, such as county, if detected.
  • sublocality - Used in Asian addresses to demark a district within a city, if detected.
DATE

Date.

The metadata identifies the components of the date:

  • year - Four digit year, if detected.
  • month - Two digit month number, if detected.
  • day - Two digit day number, if detected.
NUMBER

Number.

The metadata is the number itself.

PRICE

Price.

The metadata identifies the value and currency.

ConversationLevelSentiment

One channel of conversation-level sentiment data.

JSON representation
{
  "channelTag": integer,
  "sentimentData": {
    object (SentimentData)
  }
}
Fields
channelTag

integer

The channel of the audio that the data applies to.

sentimentData

object (SentimentData)

Data specifying sentiment.

Intent

The data for an intent. Represents a detected intent in the conversation, for example MAKES_PROMISE.

JSON representation
{
  "id": string,
  "displayName": string
}
Fields
id

string

The unique identifier of the intent.

displayName

string

The human-readable name of the intent.

IssueModelResult

Issue Modeling result on a conversation.

JSON representation
{
  "issueModel": string,
  "issues": [
    {
      object (IssueAssignment)
    }
  ]
}
Fields
issueModel

string

Issue model that generates the result. Format: projects/{project}/locations/{location}/issueModels/{issueModel}

issues[]

object (IssueAssignment)

All the matched issues.

AnnotatorSelector

Selector of all available annotators and phrase matchers to run.

JSON representation
{
  "runInterruptionAnnotator": boolean,
  "runSilenceAnnotator": boolean,
  "runPhraseMatcherAnnotator": boolean,
  "phraseMatchers": [
    string
  ],
  "runSentimentAnnotator": boolean,
  "runEntityAnnotator": boolean,
  "runIntentAnnotator": boolean,
  "runIssueModelAnnotator": boolean,
  "issueModels": [
    string
  ],
  "runSummarizationAnnotator": boolean,
  "summarizationConfig": {
    object (SummarizationConfig)
  }
}
Fields
runInterruptionAnnotator

boolean

Whether to run the interruption annotator.

runSilenceAnnotator

boolean

Whether to run the silence annotator.

runPhraseMatcherAnnotator

boolean

Whether to run the active phrase matcher annotator(s).

phraseMatchers[]

string

The list of phrase matchers to run. If not provided, all active phrase matchers will be used. If inactive phrase matchers are provided, they will not be used. Phrase matchers will be run only if runPhraseMatcherAnnotator is set to true. Format: projects/{project}/locations/{location}/phraseMatchers/{phraseMatcher}

runSentimentAnnotator

boolean

Whether to run the sentiment annotator.

runEntityAnnotator

boolean

Whether to run the entity annotator.

runIntentAnnotator

boolean

Whether to run the intent annotator.

runIssueModelAnnotator

boolean

Whether to run the issue model annotator. A model should have already been deployed for this to take effect.

issueModels[]

string

The issue model to run. If not provided, the most recently deployed topic model will be used. The provided issue model will only be used for inference if the issue model is deployed and if runIssueModelAnnotator is set to true. If more than one issue model is provided, only the first provided issue model will be used for inference.

runSummarizationAnnotator

boolean

Whether to run the summarization annotator.

summarizationConfig

object (SummarizationConfig)

Configuration for the summarization annotator.

SummarizationConfig

Configuration for summarization.

JSON representation
{

  // Union field model_source can be only one of the following:
  "conversationProfile": string,
  "summarizationModel": enum (SummarizationModel)
  // End of list of possible types for union field model_source.
}
Fields
Union field model_source. Summarization must use either a preexisting conversation profile or one of the supported default models. model_source can be only one of the following:
conversationProfile

string

Resource name of the Dialogflow conversation profile. Format: projects/{project}/locations/{location}/conversationProfiles/{conversationProfile}

summarizationModel

enum (SummarizationModel)

Default summarization model to be used.

SummarizationModel

Summarization model to use, if conversationProfile is not used.

Enums
SUMMARIZATION_MODEL_UNSPECIFIED Unspecified summarization model.
BASELINE_MODEL The CCAI baseline model.
BASELINE_MODEL_V2_0 The CCAI baseline model, V2.0.

Methods

create

Creates an analysis.

delete

Deletes an analysis.

get

Gets an analysis.

list

Lists analyses.