How sharvarisalkar/emoji_text_predictor works
Emoji Text Predictor is a small Flask app that accepts text in a web form and returns semantically matched emojis. The runtime route passes submitted text to word-level SBERT matching, which compares embeddings against precomputed emoji-keyword vectors and maps the best match to emoji characters. A separate training script encodes the keyword list and saves vectors for runtime use. The README describes additional preprocessing, but the sampled runtime code only lowercases, splits, and skips common words; the HTML template was not sampled, so UI details are limited to documented behavior.
Main entry points: run.py Flask route · train.py Vector preparation · index.html Text form · emoji_data.py Emoji catalog
Components 8
Web interface
- Text form
index.html - Flask route
run.py
Emoji matching
- Word matcher
run.py - SBERT encoder
- Similarity ranking
run.py
Embedding data
- Emoji catalog
emoji_data.py - Vector preparation
train.py
Other components
- Text user
Connections 10
- Text user → Text form: enters text
README.md - Text form → Flask route: submits text
README.md - Flask route → Word matcher: calls
run.py - Flask route → Text form: renders result
run.py - Word matcher → SBERT encoder: encodes words
run.py - Word matcher → Similarity ranking: scores vectors
run.py - Similarity ranking → Emoji catalog: maps best match
run.py - Vector preparation → Emoji catalog: encodes keywords
train.py - Vector preparation → SBERT encoder: encodes keywords
train.py - Flask route → Vector preparation: loads saved vectors
run.py