Emotion Analyzer is a program designed to identify character names in a novel text and track the emotional changes of each character over time. The program uses Plutchik's (1980) "Wheel of Emotions" to classify emotions. The extracted emotional information is saved in a TSV file for each character.
- Identify character names in novel text
- Emotion analysis using Plutchik's Wheel of Emotions
- Track emotional changes of characters over time
- Save emotional changes in a TSV file
git clone https://github.com/yourusername/emotion-analyzer.git
cd emotion-analyzer
python -m venv venv
source venv/bin/activate # On Windows, use venv\Scripts\activate
pip install -r requirements.txt
python main.py
- Enter your User ID.
- Enter the novel title.
- Enter the novel text.
The program will save the results in a output//_.tsv file.
emotion_analyzer/
├── __init__.py # Module initialization file
├── character_analyzer.py # Character analysis module
├── emotion_detector.py # Emotion detection module
├── emotion_types.py # Emotion types definition file
├── text_processor.py # Text processing module
tests/
├── __init__.py # Module initialization file
├── manual_test.py # Test system output with golden standard
├── openai_api_test.py # Test system output with silver standard
├── test_utils.py # Test each function's precision and recall
LICENSE
README.md
main.py
Contributions are welcome! To contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (git checkout -b feature/new-feature).
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature/new-feature).
- Create a new Pull Request.
Furthermore, if this project is deployed on a web server, it can provide real-time novel analysis for authors, enhancing their productivity.
This project is licensed under the MIT License. See the LICENSE file for details.