A comprehensive tool for analyzing game reviews using AI-powered sentiment and aspect analysis. The application processes raw review data, extracts sentiment and aspects from individual sentences, labels aspects, and generates detailed analysis reports with visualizations.
The Review Analyzer is designed to process large volumes of game reviews to extract meaningful insights. It performs three main operations:
- Sentence Processing: Extracts sentiment and aspects from individual review sentences
- Aspect Labeling: Labels and categorizes different aspects of the game (gameplay, graphics, story, etc.)
- Analysis & Visualization: Generates comprehensive analysis reports with charts and statistics
- Multi-threaded processing for efficient handling of large datasets
- AI-powered analysis using Mistral language model
- Comprehensive logging with both console and file output
- Automatic chart generation for visual analysis
- Flexible configuration with command-line arguments
- Structured output in multiple formats (JSON, CSV, charts)
- Python 3.13
- Ollama installed and running locally
-
Clone the repository
git clone https://github.com/DFGANDP/ReviewAnalyzer.git cd SteamReviewAnalyzer -
Install dependencies
pip install -r requirements.txt
-
Install and start Ollama
# Follow instructions at https://ollama.ai/ ollama pull MHKetbi/Mistral-Small3.1-24B-Instruct-2503:q5_K_L -
Prepare input data
- Place your review JSON file in the
review_analyzer/input/directory - The default expected file is
105600_20250209173825.json
- Place your review JSON file in the
Run the analysis from the project root directory:
python -m review_analyzer.presentation.main| Argument | Type | Default | Description |
|---|---|---|---|
--workers |
int | 6 | Number of worker threads for parallel processing |
--language |
str | "english" | Language for review processing |
--limit |
int | None | Limit the number of reviews to process (useful for testing) |
Process with custom worker count:
python -m review_analyzer.presentation.main --workers 8Process reviews in a different language:
python -m review_analyzer.presentation.main --language polishProcess only first 100 reviews (for testing):
python -m review_analyzer.presentation.main --limit 100Combine multiple arguments:
python -m review_analyzer.presentation.main --workers 4 --language english --limit 50SteamReviewAnalyzer/
├── review_analyzer/
│ ├── config.py # Configuration and paths
│ ├── domain/ # Domain models and interfaces
│ │ ├── aspect_labeler.py
│ │ ├── interfaces.py
│ │ └── models.py
│ ├── infrastructure/ # Data access and external services
│ │ ├── aspect_labeler.py # AI aspect labeling
│ │ ├── dataframe_loader.py # CSV data loading
│ │ ├── dataframe_saver.py # CSV data saving
│ │ ├── global_analyzer.py # Analysis engine
│ │ ├── json_loader.py # JSON data loading
│ │ ├── json_saver.py # JSON data saving
│ │ ├── log_handlers/ # Logging configuration
│ │ ├── mistral_extractor.py # AI sentiment extraction
│ │ ├── sentence_analyzer.py # Sentence processing
│ │ ├── sentence_loader.py # Sentence data loading
│ │ └── utils.py # Utility functions
│ ├── input/ # Input data directory
│ ├── output/ # Generated output (timestamped)
│ ├── presentation/ # Application entry points
│ │ ├── main.py # Main CLI interface
│ │ ├── runner.py # Core execution logic
│ │ └── [other runners] # Specialized runners
│ ├── prompts/ # AI prompt templates
│ │ ├── prompt_extract.txt # Sentence extraction prompts
│ │ └── prompt_label.txt # Aspect labeling prompts
│ └── service/ # Business logic services
│ ├── aspect_labeling_service.py
│ └── review_sentence_processing_service.py
├── tests/ # Test suite
├── sandbox/ # Development and testing scripts
├── requirements.txt # Python dependencies
└── README.md # This file
The application generates timestamped output directories containing:
- Analysis reports (
analysis_liked.json,analysis_disliked.json) - Data files (CSV files with labeled aspects)
- Charts (PNG visualizations for each aspect)
- Logs (Detailed processing logs)
- numpy: Numerical computing
- pandas: Data manipulation and analysis
- matplotlib: Chart generation
- seaborn: Statistical data visualization
- ollama: Local AI model interface
- tqdm: Progress bars
- pytest: Testing framework
pytest tests/- Follow the existing architecture patterns
- Add tests for new functionality
- Update documentation as needed
Common Issues:
- Ollama not running: Ensure Ollama is installed and the model is pulled
- Memory issues: Reduce
--workersparameter for large datasets - Input file not found: Verify the JSON file exists in the input directory

