DevTools Logo

On-Device Sentiment Analyzer

On-Device Sentiment Analyzer

Score survey comments or a CSV column locally, with explainable word scores and annotated exports.

Runs in your browser

A deterministic lexical sentiment engine runs in your browser: no transformer download, no API call and no upload. Scores are advisory, English-tuned and fully explainable via matched terms.

Try an example

Text to analyse

5 lines · 221 bytes

Results

5 items · 3 positive · 2 negative
3 positive · 2 negative · 1 neutral band
TextLabelScoreDetails
I love this tool, it is fast and reliable.POSITIVE
0.832
The app crashed twice and support was rude.NEGATIVE
0.168
Very good documentation but the pricing is expensive.POSITIVE
0.690
Absolutely terrible experience, do not recommend.NEGATIVE
0.064
The report arrived on Tuesday.POSITIVE (mixed)
0.500

Score histogram

0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
BucketCount
01
0.11
0.20
0.30
0.40
0.51
0.61
0.70
0.81
0.90

Paste comments one per line or a CSV file, pick the text column and get POSITIVE/NEGATIVE labels with a score between 0 and 1. The engine is a deterministic lexical scorer in your browser: matched words carry weights, negation in the previous three words flips them and intensifiers scale them. Longer reviews are split into sentences and aggregated by word count with an 'aggregated' badge; scores between 0.45 and 0.55 are tagged as mixed while the raw value is kept. Expand a row to audit every matched term. Filter, sort and export annotated CSV with spreadsheet-injection-safe quoting. No model download, no API key and no data leaves the tab.

  • Survey triage: The first row scores POSITIVE with matches love/fast/reliable; the second is NEGATIVE with crashed/rude.
  • CSV column: The tool sniffs the delimiter, suggests the comment column and appends sentiment plus sentiment_score to the export.
  • Negation and intensifiers: Negation flips and dampens the word score; intensifiers scale it before the logistic transform.

Examples

Survey comments

Input
I love this tool, it is fast and reliable.
Output
POSITIVE · score ≈ 0.89 · matches love, fast, reliable

Each matched term is listed in the row detail so a reviewer can audit the label.

Negation

Input
not good
Output
NEGATIVE · good flagged as negated

Negators in the three-word window flip and dampen the following lexicon term.

Annotated CSV

Input
id,comment
1,great product
Output
id,comment,sentiment,sentiment_score
1,great product,POSITIVE,0.73…

Original columns are preserved and two result columns are appended with RFC-4180 quoting.

About this tool

The On-Device Sentiment Analyzer scores comments one per line or a chosen CSV column with a transparent lexical engine running in your browser. It maps matched words to weights, flips them under negation, applies intensifiers and reports every contributing term — no model download, no API key and no uploaded text.

Long texts are split into abbreviation-aware sentences and scored per sentence; the reported score is the word-count-weighted mean, with a visible aggregated badge so you know which rows used the policy. A 0.45–0.55 neutral band is tagged as mixed while the raw score is preserved.

CSV input supports comma, semicolon and tab delimiters, quoted multiline cells and a suggested text column. Results filter, sort and export as annotated CSV (original columns plus sentiment and sentiment_score) or as a plain two-column CSV for text mode. Output cells are escaped against spreadsheet formula injection.

What this tool does not do

  • Lexical English scoring, not a transformer or multilingual model.
  • Sarcasm, irony and domain-specific jargon are not understood.
  • The 0.45–0.55 neutral band is informational; the binary label still uses ≥ 0.5.
  • Caps: 500 one-per-line items, 20,000 CSV rows and 2 MB of input.

How to use this tool

  1. Choose input mode

    Use One per line for survey comments, or CSV to upload a delimited file and pick the text column.

  2. Review scores

    Filter by label, sort by score and open a row to see matched terms, negation flags and the raw value.

  3. Read the distribution

    Positive/negative counts and the score histogram make batch tone visible at a glance.

  4. Export

    Download the annotated CSV for text or CSV mode; formulas are prefixed to prevent spreadsheet execution.

Use cases

Support triage

Sort a week of feedback by score to find the angriest replies first.

Survey analysis

Paste a CSV export and append sentiment columns without sending customer text anywhere.

Method comparison

See exactly which words drove a lexical score before comparing it with another method.

Scoring policy

StepRule
Word scoreA curated English lexicon maps terms to weights from -3 to +3
NegationA negator in the previous three words multiplies the weight by -0.8
Intensifiersvery/really/extremely scale the weight; slightly/somewhat dampen it
Scoresigmoid(raw / 2.5); label POSITIVE at ≥ 0.5, otherwise NEGATIVE
Long textSentence scores weighted by word count; flagged with an aggregated badge

This is lexical scoring, not a neural classifier; sarcasm and domain-specific language are not understood.

Common mistakes

Mistake:Expecting neural understanding of sarcasm.

Fix:This is a word-score engine; read matched terms and use judgment for ambiguous rows.

Mistake:Pasting a multi-paragraph review into one-per-line mode.

Fix:Use the long-text policy: one row with many sentences is aggregated automatically.

Mistake:Assuming comma-only CSV.

Fix:Delimiter sniffing handles semicolons and tabs; you can also override the detected column.

Mistake:Sharing unescaped exports with spreadsheets.

Fix:The writer prefixes =/+/-/@ cells with an apostrophe to block formula execution.

Frequently asked questions

How is sentiment scored without a model?

A curated English lexicon assigns weights from -3 to +3 to matched words. A negator in the previous three words flips and dampens the weight, and intensifiers such as very or slightly scale it. The sum passes through a logistic transform to give a score between 0 and 1; POSITIVE is the label at 0.5 or above. Expand any row to see each matched term and its contribution.

Does my data leave the browser?

No. There is no model download and no API call: the entire analysis runs in your browser tab. Text is not persisted and nothing is uploaded. Downloading the annotated CSV is the only way results leave the page, and it requires an explicit click.

How are long reviews handled?

Texts longer than roughly 1,800 characters are split into abbreviation-aware sentences. Each sentence is scored separately and combined as a word-count-weighted mean; the row carries an 'aggregated' badge and a sentence count so you can tell it apart from single-pass scores.

What CSV formats are supported?

Comma, semicolon and tab delimiters are sniffed automatically. Quoted cells can contain commas and newlines. The tool suggests the most text-like column by name, length and uniqueness, but you can override it. Exports append sentiment and sentiment_score columns and prefix spreadsheet formula characters with an apostrophe.

What does the mixed/neutral band mean?

Scores between 0.45 and 0.55 are tagged as mixed because a lexical scorer is often uncertain there. The binary label still follows the ≥ 0.5 rule and the raw score is unchanged, so downstream consumers can apply their own threshold.

How accurate is lexical sentiment?

It is transparent and reproducible but limited: sarcasm, irony, negation farther than three words and domain-specific vocabulary can be wrong. It is intended for triage and audit, not clinical, legal or safety-critical decisions. The per-row matched terms make it easy to spot suspicious judgments.

References & standards