Skip to contents

Creates a bar plot showing the distribution of sentiment classifications.

Usage

plot_sentiment_distribution(sentiment_data, title = "Sentiment Distribution")

Arguments

sentiment_data

Data frame from analyze_sentiment() or with 'sentiment' column

title

Plot title (default: "Sentiment Distribution")

Value

A plotly bar chart

Examples

if (FALSE) { # \dontrun{
data(SpecialEduTech)
texts <- SpecialEduTech$abstract[1:10]
sentiment_data <- analyze_sentiment(texts)
plot <- plot_sentiment_distribution(sentiment_data)
print(plot)
} # }