A fast and zero-dependency Rust CLI tool for analyzing emoji usage, sentiment scores, and sentiment intensity in text files or standard input (stdin).
Powered by the Emoji Sentiment Ranking 1.0 dataset.
Disclaimer: Built with AI.
- β‘ Zero external runtime dependencies: The entire dataset is embedded in the compiled binary at build time.
- π Comprehensive Sentiment & Intensity Metrics: Calculates weighted sentiment scores (
-1.0to+1.0), emotional intensity (0.0to1.0), usage density, Shannon entropy, and positive/neutral/negative breakdowns. - βοΈ Polarization Index & Emotional Shift: Detects emotional conflicts (contrasting positive and negative emojis) and tracks emotional progression across text timeline, paragraphs, or lines.
- π₯ Bursts & Combos Detection: Identifies repeated emoji bursts (streaks like
π₯π₯π₯) and frequent adjacent pairs (combos likeπ₯π). - π¨ Beautiful Terminal Output: Displays colorful progress, style ratings, and clean borderless list/card views (immune to terminal emoji width grid misalignment).
- π€ Pipeline & JSON Ready: Supports
--json/-jand--summary/-sfor script automation and CI/CD integration. - π₯ Flexible Inputs & Relative Paths: Supports reading from multiple files, directories (displaying paths relative to the input folder), or stdin piping (
cat file.txt | emo).
| Metric | Scope / Formula | Description |
|---|---|---|
| Multi-File Benchmark | Aggregated per file | When passing multiple files or directories, benchmarks each file side-by-side (File Name, Emojis, Score, Intensity, Top Emoji) using relative path display. |
| Placement Bias | Relative position ( |
Evaluates whether emojis are Front-loaded (Balanced Placement, or Trailing / End-loaded ( |
| Sentiment Volatility ( |
Standard Deviation of scores | Measures emotional stability vs mood swings (Monotone / Consistent High Volatility |
| Ambiguity Index (%) | Neutral emoji ratio | Measures neutral/reserved expression (Subtle / Ambiguous π Direct & Explicit π― |
| Overall Sentiment Score |
Weighted Average Sentiment (-1.0 to +1.0). Single emoji score is |
|
| Sentiment Intensity |
Emotional Intensity / Non-Neutrality (0.0 to 1.0). Single emoji intensity is |
|
| Polarization Index |
Emotional Conflict Index (0.0 to 1.0). Detects whether a text contains contrasting positive and negative emojis simultaneously (Harmonious vs Highly Polarized). |
|
| Unicode Block Breakdown | Aggregated by Unicode block
|
Groups emoji usage by official Unicode category (e.g. Emoticons, Transport and Map Symbols) with average sentiment per category. |
| Sentiment Progression Arc | 4-Quarter Timeline / Segmented | Tracks the emotional trajectory across the text to detect trends (Warming Up π, Cooling Down π, Consistently Positive, or Fluctuating π). |
| Emoji Density |
|
Frequency density of emojis per 1,000 characters and per 100 words. |
| Style Level | Based on Emoji Density | Categorizes text expression style: Text Only, Formal / Minimal, Balanced / Casual, Expressive / Interactive, or Heavy Emoji / Social. |
| Shannon Entropy | Measures vocabulary diversity in bits. Higher entropy indicates a broader variety of emojis used rather than repeating a single emoji. | |
| Diversity Ratio | Ratio of unique emoji characters to total emoji occurrences (0.0 to 1.0). |
|
| Bursts & Streaks | Consecutive repeats ( |
Detects consecutive repeats of the same emoji (e.g. π₯π₯π₯ |
| Emoji Combos | Bigram pair counting | Detects frequent adjacent emoji pairs in sequence (e.g. π₯π or ππ). |
cargo install emoji-sentiment# Build release binary
cargo build --release
# Install binary to ~/.cargo/bin
cargo install --path .echo "Great news today! ππ Rocket launch π! But oh no, servers crashed ππ..." | emo# Single file
emo document.txt
# Multiple files or entire folder (paths shown relative to input path)
emo README.md AGENTS.md
emo path/to/logs_folder/emo --json log.txtUsage: emo [OPTIONS] [FILE]...
Arguments:
[FILE]... File(s) to analyze. If empty or '-', reads from stdin.
Options:
-j, --json Output results as formatted JSON
-s, --summary Output short one-line summary
-t, --top <TOP> Number of top emojis and categories to display [default: 10]
--by-paragraph Calculate sentiment progression by paragraph (\n\n)
--by-line Calculate sentiment progression by line (\n)
--no-color Disable terminal color output
-h, --help Print help
-V, --version Print version
================================================
EMOJI SENTIMENT ANALYSIS REPORT π
================================================
π Total Text Characters : 84
π€ Total Words Scanned : 15
π Emojis Found : 5 (5 Unique)
π― Matched in Dataset : 5 (Unmatched: 0)
π Overall Score : 0.345 (Positive π) [-1.0 ~ +1.0]
β‘ Sentiment Intensity : 0.742 [0.0 ~ 1.0]
π Sentiment Volatility : Ο = 0.409 (High Volatility π) [β₯ 0.0]
βοΈ Polarization Index : 0.960 (Highly Polarized π₯βοΈ) [0.0 ~ 1.0]
π Ambiguity & Neutral : 0.0% Neutral (Direct & Explicit π―) [0.0% ~ 100.0%]
π Expression Metrics & Placement
π·οΈ Text Style Level : Heavy Emoji / Social
π Emoji Density : 59.52 per 1,000 chars / 33.33 per 100 words
π Diversity & Entropy : 2.322 bits (Unique ratio: 100.0%)
π Placement Bias : Avg Pos: 0.53 (Trailing / End-loaded Preferred)
ββ Distribution : Front: 0.0% | Mid: 50.0% | End: 50.0%
Breakdown Distribution
[ββββββββββββββββββββββββββββββ]
Positive: 3 (60.0%) | Neutral: 0 (0.0%) | Negative: 2 (40.0%)
π Top Unicode Emoji Categories
β’ Miscellaneous Symbols and Pictographs β Count: 2 ( 40.0%) | Avg Score: +0.309
β’ Emoticons β Count: 2 ( 40.0%) | Avg Score: +0.292
β’ Transport and Map Symbols β Count: 1 ( 20.0%) | Avg Score: +0.525
π Sentiment Progression Arc
Trend Status: Cooling Down π (Positive β Negative)
β’ Q1 (Beginning) β Emojis: 2 | Score: +0.709 | Intensity: 0.799
β’ Q2 (Early Mid) β Emojis: 2 | Score: +0.216 | Intensity: 0.702
β’ Q3 (Late Mid) β Emojis: 1 | Score: -0.122 | Intensity: 0.707
π Most Used Emojis
1. π (PARTY POPPER) β Count: 1 | Score: +0.740 (Positive)
2. π (BROKEN HEART) β Count: 1 | Score: -0.122 (Negative)
3. π (SMILING FACE WITH HEART-SHAPED EYES) β Count: 1 | Score: +0.678 (Positive)
4. π (LOUDLY CRYING FACE) β Count: 1 | Score: -0.093 (Negative)
5. π (ROCKET) β Count: 1 | Score: +0.525 (Positive)
π Frequent Emoji Combos
β’ ππ β 1 occurrences
β’ ππ β 1 occurrences
β’ ππ β 1 occurrences
Run unit tests:
cargo testThe bundled Emoji_Sentiment_Data_v1.0.csv is from:
Kralj Novak, Petra; SmailoviΔ, Jasmina; Sluban, Borut; and MozetiΔ, Igor (2015), Emoji Sentiment Ranking 1.0, Slovenian language resource repository CLARIN.SI, ISSN 2820-4042.
- Resource: http://hdl.handle.net/11356/1048
- Paper: https://doi.org/10.1371/journal.pone.0144296
- Dataset License: Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
While emo relies on Emoji Sentiment Ranking 1.0 for compiled zero-dependency runtime evaluation, the NLP research community offers several notable benchmark datasets for emoji sentiment and emotion analysis:
-
Emoji Sentiment Ranking 1.0 (Built-in)
- Authors: Petra Kralj Novak et al. (2015)
- Focus: Evaluates sentiment polarity scores (
-1.0to+1.0) for 751 common emojis based on 1.6M+ annotated tweets. - Resource: CLARIN.SI hdl:11356/1048 / PLOS ONE Paper
-
TweetEval / SemEval-2018 Task 2 (Emoji Prediction)
- Authors: Barbieri et al. (2018)
- Focus: Standard NLP benchmark for predicting appropriate emoji usage from text context across 20 common emoji classes.
- Resource: Available on Hugging Face Datasets (
tweet_evaldataset,emojisubset).
-
DeepMoji Dataset (Distant Supervision Corpus)
- Authors: Felbo et al. (EMNLP 2017)
- Focus: 1.2 billion Twitter posts categorized across 64 emoji labels. Widely used for transfer learning, sarcasm detection, and sentiment representations.
- Resource: GitHub - bfelbo/DeepMoji
-
EmojiNet (Emoji Sense & Polarity Knowledge Base)
- Authors: Knoesis Institute (Sanjaya et al.)
- Focus: Structured knowledge base linking over 2,300+ emojis to BabelNet synsets, sentiment polarities, and word sense disambiguation (e.g. π as praying vs high-five).
- Resource: emojinet.knoesis.org
-
Google GoEmotions (Fine-Grained Emotion Dataset)
- Authors: Google Research (Demszky et al., 2020)
- Focus: 58k Reddit comments labeled across 27 fine-grained emotions plus Neutral, commonly mapped 1-to-1 to emoji representations.
- Resource: Available on Hugging Face (
google/go_emotions).
-
Social Media Slang & Emoji Sentiment Corpus (Built-in Multilingual Slang Dataset)
- Focus: UGC social media corpus containing slang, acronyms, CJK internet vocabulary (Traditional/Simplified Chinese, Japanese, Korean), elongated words, and explicit sarcasm (
Positive,Negative,Neutral,Sarcastic). - Resource: Kaggle (
Social Media Slang & Emoji Sentiment) &assets/Multilingual_Slang_v1.0.csv.
- Focus: UGC social media corpus containing slang, acronyms, CJK internet vocabulary (Traditional/Simplified Chinese, Japanese, Korean), elongated words, and explicit sarcasm (
The source code is licensed under the MIT License (LICENSE).