ParryAPI uses VADER sentiment analysis to detect emotional tone in real time. Fast, flexible, and built for modern communities.
Enter any text, or pick a preset below.
Negative messages are blurred by default. Click them to reveal.
Send a message to see real-time analysis
Negative messages are blurred, click to reveal
Everything you need to integrate ParryAPI.
sentiment-analyzer.js into your project<script src="sentiment-analyzer.js"></script>const sa = new SentimentAnalyzer();sa.analyze("your text")analyze() returns an object:
classify() returns "Positive", "Negative", or "Neutral"
const analyzer = new SentimentAnalyzer();
const result = analyzer.analyze(
"I love this game!"
);
// { compound: 0.6369,
// positive: 0.6,
// negative: 0.0,
// neutral: 0.4 }
const label = analyzer.classify(
"I love this game!"
);
// "Positive"
const { compound } =
analyzer.analyze(text);
if (compound >= 0.2) {
label = "Positive";
} else if (compound <= -0.2) {
label = "Negative";
} else {
label = "Neutral";
}
// Or pass to classify():
analyzer.classify(text, 0.4, -0.4);
// Scores: -4 to +4
analyzer.addCustomWords({
'epic': 2.5,
'legendary': 3.0,
'terrible': -2.5,
'griefer': -2.5,
});
// Now affects analysis:
analyzer.analyze("That was epic!");