Simple tool to map emotions in text.
- Save your text to a file, e.g.
mytext.txt. - Run the analyzer:
python3 moodmapper.py mytext.txt --json result.json --lang ptThe script will print the dominant emotion for each sentence, a short summary
and suggestions for color and music. Use --lang pt for Portuguese text (default
is English). If --json is provided, the per-sentence analysis is saved to the
given file in JSON format.
Install additional dependencies:
pip install transformers torch matplotlibRun the advanced analyzer which draws a sentiment chart and can export results to JSON or PNG:
python3 moodmapper_transformer.py mytext.txt --json result.json --image grafico.pngInstall all optional dependencies:
pip install -r requirements.txtRun the interactive web interface:
streamlit run streamlit_app.pyEnter your text (one line per snippet) and click Analisar to see the emotional analysis, color-coded chart and suggested soundtrack. You can also download the JSON results directly from the page.