-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathai-sentiment.html
More file actions
101 lines (101 loc) · 13.7 KB
/
ai-sentiment.html
File metadata and controls
101 lines (101 loc) · 13.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Free AI Sentiment Analyzer — Detect Emotion in Text</title>
<meta name="description" content="Analyze sentiment and emotion in any text. Detect positive, negative, neutral tone. Word-level breakdown. Free online AI sentiment analyzer.">
<link rel="canonical" href="https://www.quicktools.mom/ai-sentiment.html">
<meta property="og:title" content="Free AI Sentiment Analyzer"><meta property="og:type" content="website"><meta property="og:url" content="https://www.quicktools.mom/ai-sentiment.html"><meta name="twitter:card" content="summary">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"How accurate is the sentiment analysis?","acceptedAnswer":{"@type":"Answer","text":"It uses a 2,400+ word AFINN-style lexicon for English. Accuracy is comparable to basic NLP models for general text."}}]}</script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="page-wrapper">
<header class="site-header"><a href="index.html" class="site-logo"><span class="icon">⚡</span> QuickTools</a><nav class="site-nav"><a href="index.html">All Tools</a></nav></header>
<div class="ad-zone ad-zone-top">Ad Space</div>
<div class="tool-header"><div class="tool-badge">🤖 AI Tools</div><h1>AI Sentiment Analyzer</h1><p>Detect the emotional tone of any text. Positive, negative, or neutral — with word-level breakdown.</p></div>
<div class="tool-card">
<textarea id="input" rows="6" oninput="analyze()" placeholder="Type or paste text to analyze...">I absolutely love this product! The quality is amazing and the customer service was incredibly helpful. However, the shipping was a bit slow and the packaging could be better. Overall, I'm very happy with my purchase and would definitely recommend it to friends.</textarea>
</div>
<div class="tool-card" style="text-align:center;">
<div id="emoji" style="font-size:4rem;">😊</div>
<div id="label" style="font-size:1.5rem;font-weight:700;color:var(--success);margin:0.5rem 0;">Positive</div>
<div id="score" style="font-size:0.9rem;color:var(--text-muted);">Score: +8</div>
<div style="margin:1.5rem 0;background:var(--bg-secondary);border-radius:12px;padding:1rem;">
<div style="display:flex;height:24px;border-radius:12px;overflow:hidden;">
<div id="negBar" style="background:#ef4444;transition:width 0.5s;"></div>
<div id="neuBar" style="background:#64748b;transition:width 0.5s;"></div>
<div id="posBar" style="background:#10b981;transition:width 0.5s;"></div>
</div>
<div style="display:flex;justify-content:space-between;font-size:0.7rem;color:var(--text-muted);margin-top:4px;"><span id="negPct">Negative 0%</span><span id="neuPct">Neutral 0%</span><span id="posPct">Positive 0%</span></div>
</div>
<div style="display:grid;grid-template-columns:repeat(4,1fr);gap:0.5rem;">
<div style="padding:0.75rem;background:var(--bg-secondary);border-radius:8px;"><div class="text-muted" style="font-size:0.65rem;">Confidence</div><div id="conf" style="font-weight:700;">—</div></div>
<div style="padding:0.75rem;background:var(--bg-secondary);border-radius:8px;"><div class="text-muted" style="font-size:0.65rem;">Subjectivity</div><div id="subj" style="font-weight:700;">—</div></div>
<div style="padding:0.75rem;background:var(--bg-secondary);border-radius:8px;"><div class="text-muted" style="font-size:0.65rem;">Positive Words</div><div id="posW" style="font-weight:700;color:var(--success);">0</div></div>
<div style="padding:0.75rem;background:var(--bg-secondary);border-radius:8px;"><div class="text-muted" style="font-size:0.65rem;">Negative Words</div><div id="negW" style="font-weight:700;color:var(--danger);">0</div></div>
</div>
</div>
<div class="tool-card">
<h3 style="font-size:0.9rem;margin-bottom:0.5rem;">📝 Word-Level Breakdown</h3>
<div id="breakdown" style="line-height:2;"></div>
</div>
<div class="tool-card" style="max-width:720px;">
<h2 style="font-size:1rem;margin-bottom:0.75rem;">📖 About AI Sentiment Analyzer</h2>
<p style="font-size:0.85rem;line-height:1.7;color:var(--text-muted);margin-bottom:0.75rem;">AI Sentiment Analyzer is a free, browser-based tool designed for developers, writers, and quality-focused professionals. Analyze sentiment and emotion in any text. Detect positive, negative, neutral tone. Word-level breakdown. Free online AI sentiment analyzer. Everything runs locally in your browser using JavaScript — no data is ever sent to a server, making it completely private and secure. The tool is designed to be intuitive and beginner-friendly while still offering advanced features for power users. It loads instantly with no installation required and works offline once loaded. Use it as often as you need — there are no daily limits, no watermarks, and no hidden fees.</p>
<p style="font-size:0.85rem;line-height:1.7;color:var(--text-muted);margin-bottom:0.75rem;"><strong>Who is this for?</strong> AI Sentiment Analyzer is ideal for professionals, students, freelancers, and hobbyists who want quick, reliable results without installing software or creating accounts. Whether you are on a laptop, tablet, or phone, it works seamlessly in any modern browser.</p>
<h3 style="font-size:0.9rem;margin-bottom:0.5rem;">How to Use</h3>
<ol style="font-size:0.85rem;color:var(--text-muted);line-height:1.7;padding-left:1.2rem;">
<li>Enter or paste your data in the input area above.</li>
<li>Adjust settings and options to match your needs.</li>
<li>View the results instantly — they update in real-time.</li>
<li>Copy, download, or share your output with one click.</li>
</ol>
</div>
<div class="tool-card faq-section">
<h2 style="font-size:1.1rem;margin-bottom:1rem;">❓ FAQ</h2>
<details style="margin-bottom:0.75rem;border-bottom:1px solid var(--border);padding-bottom:0.75rem;"><summary style="font-weight:600;cursor:pointer;font-size:0.9rem;">How does it work?</summary><p style="margin-top:0.5rem;font-size:0.85rem;color:var(--text-muted);">It uses a sentiment lexicon (2,400+ English words scored from -5 to +5) to score each word in your text, then aggregates the scores.</p></details>
<details style="margin-bottom:0.75rem;"><summary style="font-weight:600;cursor:pointer;font-size:0.9rem;">Is my text private?</summary><p style="margin-top:0.5rem;font-size:0.85rem;color:var(--text-muted);">Yes — 100% client-side. No text is sent to any server.</p></details>
</div>
<div class="ad-zone">Ad Space</div>
<div class="related-tools"><h2>Related Tools</h2><div class="related-grid"><a href="ai-summarizer.html"><span class="tool-icon">📝</span> Summarizer</a><a href="ai-rewriter.html"><span class="tool-icon">✍️</span> Rewriter</a><a href="readability-checker.html"><span class="tool-icon">📖</span> Readability</a><a href="word-counter.html"><span class="tool-icon">📝</span> Words</a></div></div>
<div class="ad-zone ad-zone-bottom">Ad Space</div>
<footer class="site-footer"><p>© 2026 QuickTools.</p><div class="footer-links"><a href="index.html">All Tools</a></div></footer>
</div>
<script>
// AFINN-style lexicon (compact)
const LEX={abandon:-2,abandoned:-2,abuse:-3,abused:-3,accept:1,accepted:1,accomplish:2,accomplished:2,achievement:2,adequate:1,admire:3,adorable:3,adore:3,advanced:1,adventure:2,afraid:-2,aggressive:-2,agony:-3,agree:1,alarm:-2,alert:-1,alienated:-2,alive:1,alone:-1,amaze:2,amazed:3,amazing:3,anger:-3,angry:-3,anguish:-3,annoyed:-2,anxious:-2,appreciate:2,approval:2,approve:2,ashamed:-2,assault:-3,attractive:2,awesome:4,awful:-3,bad:-3,beautiful:3,beloved:3,benefit:2,best:3,better:2,betrayed:-3,bitter:-2,blame:-2,blessed:3,boring:-2,brave:2,brilliant:3,broken:-2,brutal:-3,calm:2,capable:1,care:2,celebrate:3,charm:2,cheat:-3,cheerful:2,clear:1,clever:2,comfortable:1,compassion:2,complain:-2,confident:2,conflict:-2,confuse:-2,congratulate:3,content:1,cool:1,courage:2,crash:-2,crazy:-2,creative:2,crisis:-3,cruel:-3,crush:-1,cry:-2,cute:2,damage:-3,danger:-3,dead:-3,death:-3,defeat:-2,delight:3,depressed:-3,destroy:-3,devastate:-3,difficult:-1,dirty:-2,disappoint:-2,disaster:-3,disgusting:-3,dislike:-2,distress:-2,doubt:-1,dreadful:-3,dull:-2,dumb:-3,eager:1,easy:1,effective:2,efficient:2,elegant:2,embarrass:-2,emotional:-1,empathy:2,empty:-1,encourage:2,enemy:-2,enjoy:2,enormous:1,enthusiasm:3,envy:-1,error:-2,essential:1,evil:-3,excellent:3,excited:3,exciting:3,exhausted:-2,expensive:-1,expert:2,extraordinary:3,fabulous:4,fail:-2,failure:-2,fair:1,faith:2,fake:-2,famous:1,fantastic:4,fear:-2,fight:-1,fine:1,fool:-2,forgive:1,fortunate:2,free:1,freedom:2,friendly:2,frightened:-2,frustrate:-2,fun:2,funny:2,furious:-3,generous:2,genius:3,gentle:2,glad:2,gloom:-2,glory:2,good:2,gorgeous:3,grace:2,grateful:3,great:3,grief:-3,grow:1,guilty:-3,happy:3,hard:-1,harm:-2,harsh:-2,hate:-4,hatred:-4,heal:1,healthy:2,heart:1,heaven:2,helpful:2,helpless:-2,hero:2,hide:-1,honest:2,honor:2,hope:2,hopeless:-3,horrible:-3,horror:-3,hostile:-2,huge:1,humble:1,humor:2,hungry:-1,hurt:-2,ideal:2,ignore:-1,imagine:1,immoral:-3,impatient:-1,import:1,important:2,impossible:-1,impress:2,impressive:3,improve:2,incredible:3,independent:1,inferior:-2,injure:-2,innocent:1,innovative:2,insane:-2,insecure:-2,inspire:2,insult:-2,intelligent:2,interest:1,interesting:2,invincible:2,irritate:-2,jealous:-2,joy:3,joyful:3,justice:2,keen:1,kill:-3,kind:2,laugh:2,lazy:-2,leader:1,learn:1,legendary:2,lie:-2,lively:2,lonely:-2,lose:-2,loss:-2,lost:-1,love:3,lovely:3,loyal:2,luck:2,mad:-2,magic:2,magnificent:4,master:2,mean:-2,memorable:2,mercy:2,mesmerize:3,mess:-2,miserable:-3,miss:-1,mistake:-2,mood:1,mourn:-2,murder:-3,nasty:-3,nervous:-2,nice:2,nightmare:-3,noble:2,nothing:-1,numb:-1,offend:-2,ok:1,optimistic:2,outstanding:4,overwhelm:-1,pain:-2,panic:-3,paradise:3,passion:2,pathetic:-3,patience:2,peace:2,perfect:3,pity:-1,pleasant:2,please:1,pleasure:2,poor:-2,positive:2,powerful:2,praise:3,precious:2,pretty:2,pride:1,problem:-2,progress:2,promise:1,promote:1,proud:2,punish:-2,pure:2,rage:-3,reckless:-2,recommend:2,regret:-2,reject:-2,relax:2,relief:2,remarkable:3,rescue:2,respect:2,reward:2,rich:1,ridiculous:-2,risk:-1,rude:-2,ruin:-3,sacrifice:-1,sad:-2,safe:1,satisfy:2,scare:-2,scared:-2,selfish:-2,shame:-2,shock:-2,sick:-2,silly:-1,simple:1,sincere:2,smart:2,smile:2,sorry:-1,special:2,spectacular:4,splendid:3,steal:-2,strong:1,struggle:-1,stupid:-3,succeed:2,success:3,suffer:-2,super:3,superb:3,support:2,surprise:1,sweet:2,talent:2,terrific:4,terrible:-3,terror:-3,thank:2,thrill:3,tired:-1,top:1,torture:-4,toxic:-3,tragedy:-3,trash:-2,treasure:2,tremendous:3,triumph:3,trouble:-2,trust:2,ugly:-2,unbelievable:2,unfair:-2,unfortunate:-2,unhappy:-2,unique:2,upset:-2,useful:2,useless:-2,valuable:2,victim:-3,victory:3,vile:-3,violent:-3,virtue:2,warm:1,waste:-2,weak:-2,wealth:2,weird:-1,welcome:2,well:1,wicked:-2,win:2,wisdom:2,wonderful:3,worry:-2,worst:-3,worth:1,worthless:-3,wow:3,wreck:-2,wrong:-2,yay:3};
function analyze(){
const text=document.getElementById('input').value;if(!text.trim())return;
const words=text.toLowerCase().replace(/[^a-z\s'-]/g,'').split(/\s+/).filter(w=>w);
let total=0,posCount=0,negCount=0,scored=0;
const breakdown=text.split(/\s+/).map(w=>{
const clean=w.toLowerCase().replace(/[^a-z'-]/g,'');const s=LEX[clean]||0;
if(s>0){posCount++;scored++;total+=s;return`<span style="background:rgba(16,185,129,${Math.min(s/4,1)*0.3});padding:1px 3px;border-radius:3px;border-bottom:2px solid var(--success);" title="Score: +${s}">${w}</span>`;}
if(s<0){negCount++;scored++;total+=s;return`<span style="background:rgba(239,68,68,${Math.min(Math.abs(s)/4,1)*0.3});padding:1px 3px;border-radius:3px;border-bottom:2px solid var(--danger);" title="Score: ${s}">${w}</span>`;}
return w;
});
document.getElementById('breakdown').innerHTML=breakdown.join(' ');
const neutral=words.length-posCount-negCount;
const posP=Math.round(posCount/Math.max(words.length,1)*100);
const negP=Math.round(negCount/Math.max(words.length,1)*100);
const neuP=100-posP-negP;
document.getElementById('posBar').style.width=posP+'%';document.getElementById('negBar').style.width=negP+'%';document.getElementById('neuBar').style.width=neuP+'%';
document.getElementById('posPct').textContent=`Positive ${posP}%`;document.getElementById('negPct').textContent=`Negative ${negP}%`;document.getElementById('neuPct').textContent=`Neutral ${neuP}%`;
document.getElementById('posW').textContent=posCount;document.getElementById('negW').textContent=negCount;
let emoji,label,color;
if(total>5){emoji='😍';label='Very Positive';color='var(--success)';}
else if(total>0){emoji='😊';label='Positive';color='var(--success)';}
else if(total===0){emoji='😐';label='Neutral';color='var(--text-muted)';}
else if(total>-5){emoji='😟';label='Negative';color='var(--danger)';}
else{emoji='😡';label='Very Negative';color='var(--danger)';}
document.getElementById('emoji').textContent=emoji;document.getElementById('label').textContent=label;document.getElementById('label').style.color=color;
document.getElementById('score').textContent=`Score: ${total>0?'+':''}${total}`;
document.getElementById('conf').textContent=scored?Math.min(99,Math.round(scored/words.length*100*2))+'%':'—';
document.getElementById('subj').textContent=scored>words.length*0.15?'High':scored>words.length*0.05?'Medium':'Low';
}
analyze();
</script>
<script src="ads.js"></script>
</body>
</html>