sentiment_polarity {WeatherSentiment}R Documentation

Analyze Sentiment Polarity of a Tweet

Description

This function takes a tweet text as input and performs sentiment analysis to visualize its overall sentiment polarity.

Usage

sentiment_polarity(tweet)

Arguments

tweet

A character vector containing the tweet text.

Value

A ggplot object displaying a bar chart with sentiment polarity (positive/negative) on the x-axis and sentiment score on the y-axis.

Author(s)

Leila Marvian Mashhad and Andriette Bekker and Mohammad Arashi and Priyanka Nagar.

Examples

e <- c("The rain is ruining my outdoor plans today.", 
"I love the sunny weather today!")

s1 <- sentiment_polarity(e)
print(s1)

[Package WeatherSentiment version 1.0 Index]