Michael_Oldham | 2021-07-08 10:45:20 UTC | #1
Wanted to see how many times a topic comes up in conversations. How would I do this with an API. Looks like /api/v2/speechandtextanalytics/transcripts/search would do it but I do not know it is structured to find a topic. I guess it will look like below which is for sentiments.
{ "type": "RANGE", "fields": [ "conversationSentimentScore" ], "startValue": 0.1, "endValue": 0.5 }
Jerome.Saint-Marc | 2021-07-08 12:53:06 UTC | #2
Hello,
I think the Analytics Transcript Aggregate query - POST /api/v2/analytics/transcripts/aggregates/query might be a more appropriate endpoint to achieve this.
I just tried it (I must confess for the first time, following your question....) and it might provide what you are looking for. I assume that by "how many times a topic comes up in conversations" - you mean counting how many conversations included a specific topic (counting 1 per conversation even if the topic is repeated/detected several times in the conversation).
If yes, I used the following request body:
{ "interval": "2021-07-07T22:00:00.000Z/2021-07-08T22:00:00.000Z", "groupBy": ["mediaType"], "metrics": ["nTopicCommunications"], "flattenMultivaluedDimensions": false, "filter": { "type": "and", "predicates": [ { "dimension": "resultsBy", "value": "communication" }, { "dimension": "topicId", "value": "THETOPICIDYOUARESEARCHING_FOR" } ] } }
Regards,
system | 2021-08-08 12:53:09 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 11423