Skip to content

๐Ÿ“Š A comprehensive Python toolkit that leverages local Large Language Models (LLMs) via Ollama to analyze Steam game reviews.

License

Notifications You must be signed in to change notification settings

mertkasar/sentimentality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Steam Review Sentiment Analyzer

A comprehensive Python toolkit that leverages local Large Language Models (LLMs) via Ollama to analyze Steam game reviews. Extract sentiment, identify key aspects, and gain deep insights into player opinions with intelligent grouping and statistical analysis.

๐ŸŽฏ How It Works

  • Fetches reviews directly from Steam's API for any game
  • Analyzes sentiment using local AI models (no cloud dependencies)
  • Extracts aspects that players love or hate about games
  • Groups similar feedback intelligently (e.g., "graphics", "visuals", "art style")
  • Provides statistics and exportable CSV reports

๐Ÿš€ Key Features

  • ๐ŸŽฎ Steam API Integration - Direct access to review data
  • ๐Ÿค– Local LLM Processing - Privacy-focused AI analysis via Ollama
  • ๐Ÿ“Š Intelligent Grouping - Automatically categorizes similar aspects
  • ๐Ÿ”„ Batch Processing - Efficient handling of large review datasets
  • ๐Ÿ“ˆ Statistical Analysis - Comprehensive sentiment breakdowns
  • ๐Ÿ’พ CSV Export - Easy data export for further analysis

๐ŸŽฏ For

  • Game Developers - Understand player feedback at scale
  • Data Analysts - Extract insights from user-generated content
  • Researchers - Study gaming communities and sentiment trends
  • Indie Developers - Analyze competitor reviews and market sentiment
  • Privacy-Conscious Users - Process data locally without cloud APIs

Prerequisites

  • Python 3.8 or higher
  • Ollama installed and running
  • Steam API key (get one here)
  • At least 8GB RAM (16GB+ recommended for larger models)

Installation & Setup

1. Install Ollama and instruct model

curl -fsSL https://ollama.ai/install.sh | sh
ollama pull mistral:instruct

# Alternative models you can try:
# ollama pull llama2:7b
# ollama pull codellama:7b

2. Prepare Environment

# Copy example .env file
cp .env.example .env

# Replace your Steam API Key in .env file

3. Create Virtual Environment

# Create virtual environment
python -m venv venv

# Activate virtual environment
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Usage

1. Sentiment Analyzer

Fetches and analyzes Steam reviews for sentiment and aspects.

Basic usage:

# Analyze all reviews for a specific Steam game (using App ID)
python sentiment_analyzer.py 730

# Common Steam App IDs:
# 730 = Counter-Strike 2
# 440 = Team Fortress 2
# 570 = Dota 2
# 1086940 = Baldur's Gate 3

Advanced Usage:

# Analyze specific number of reviews
python sentiment_analyzer.py 730 --reviews 100

# Use different model
python sentiment_analyzer.py 730 --model llama2:7b

# Use individual processing (slower but more reliable)
python sentiment_analyzer.py 730 --batch-size 1

# Combine multiple options
python sentiment_analyzer.py 730 --reviews 500 --batch-size 10 --model mistral:instruct

Output:

The script generates a CSV file with columns:

  • review_id - Unique review identifier
  • reviewer_name - Steam user ID
  • review_text - Original review text (truncated)
  • translation - English translation (if needed)
  • sentiment - positive/negative/mixed
  • positive_aspects - Comma-separated positive aspects
  • negative_aspects - Comma-separated negative aspects

Example output filename: review_analysis_730_150_20241201_143022.csv Screenshot 2025-05-31 at 15 41 33

2. Aspect Analyzer

Fetches and analyzes Steam reviews for sentiment and aspects.

Usage:

# Analyze aspects from previous output
python aspect_analyzer.py review_analysis_730_150_20241201_143022.csv

# Use different model
python aspect_analyzer.py input.csv --model llama2:7b

Output:

The script generates a CSV file with columns:

  • keyword - categorized aspect keyword
  • sentiment_type - "positive" or "negative"
  • aspect_group - Consolidated aspect name
  • review_count - Total mentions across all similar aspects
  • reviewer_ids - Reviewer ID's triggered this keyword
  • review_urls - Reviewer URL triggered this keyword

Example output filename: review_analysis_730_150_20241201_143022_grouped_aspects_20241201_144530.csv Screenshot 2025-05-31 at 16 42 50

About

๐Ÿ“Š A comprehensive Python toolkit that leverages local Large Language Models (LLMs) via Ollama to analyze Steam game reviews.

Topics

Resources

License

Stars

Watchers

Forks

Languages