from textblob import TextBlob
# List of product reviews
reviews = [
"This product is amazing and works perfectly",
"Very bad quality, I am disappointed",
"The product is okay, not too good or bad",
"Excellent quality and fast delivery",
"Worst experience ever"
# Function for sentiment analysis
def analyze_sentiment(review):
analysis = TextBlob(review)
polarity = [Link]
if polarity > 0:
return "Positive"
elif polarity < 0:
return "Negative"
else:
return "Neutral"
# Analyze each review
for review in reviews:
sentiment = analyze_sentiment(review)
print(f"Review: {review}")
print(f"Emotion: {sentiment}\n")