Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

analyzed-conversation-viewer

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analyzed-conversation-viewer

analyzed-conversation-viewer is a UI component that hel you display a conversation analysis through multiple aspects like the conversation sentiment, conversation personally identifiable information (PII), and conversation summary

  • 1.0.7
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

analyzed-conversation-viewer


analyzed-conversation-viewer is a UI component that hel you display a conversation analysis through multiple aspects like the conversation sentiment, conversation personally identifiable information (PII), and conversation summary

the target of this component is to gather the analysis resulting from the different services in one place to give the user the needed information for each sentence and the overall conversation.


Props


NameTypeDescriptionDefault value
result
{ sentences: SentenceType[] }
the main object to display
labels
{
onText?: string;
offText?: string;
hidePii?: string;
piiDescription?: string;
sentimentHeader?: string;
transcriptHeader?: string;
sentimentDescription?: string;
}
Optional - pass the labels you want to be displayed instead the default ones
{
onText: 'On',
offText: 'Off',
hidePii: 'Hide PII',
sentimentHeader: 'Sentiment',
transcriptHeader: 'Transcript',
piiDescription: 'Sensitive information across several pre-defined categories is detected and redacted from the transcript.',
sentimentDescription: 'Sensitive information across several pre-defined categories is detected and redacted from the transcript.'
}

## SentenceType

NameType
textstring
speakerTitlestring
redactedTextstring
entitiesNamedEntity[]
sentimentSentimentTypes
duration
{
minutes: number;
seconds: number;
}

## NamedEntity

NameType
textstring
offsetnumber
lengthnumber
categorystring
subcategorystring
confidenceScorenumber

## SentimentTypes

SentimentTypes = 'positive' | 'negative' | 'neutral'

Examples


Here is a usage example:

const conversationResult = {
  sentences: [
    {
      sentiment: "positive",
      speakerTitle: "Speaker 1",
      duration: { minutes: 0, seconds: 2 },
      text: "Hi thank you for calling Bank of Contoso. Hello my name is Mary. How can I help you today?",
      redactedText: "Hi thank you for calling Bank of Contoso. Hello my name is ****. How can I help you today?",
      entities: [
        { category: "Person", confidenceScore: 0.9, length: 4, offset: 59, text: "Mary" },
        { category: "Organization", confidenceScore: 0.9, length: 15, offset: 25, text: "Bank of Contoso" },
      ],
    },
    {
      entities: [],
      sentiment: "neutral",
      speakerTitle: "Speaker 2",
      duration: { minutes: 0, seconds: 2 },
      text: "I would like to know my remaining balance in my checking account.",
      redactedText: "I would like to know my remaining balance in my checking account.",
    },
  ],
};

return <AnalyzedConversationViewer result={conversationResult} />;

and the view will be like:

image.png

the nice annotations are made by the annotator library

Keywords

FAQs

Package last updated on 09 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc