You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

🎬 50K IMDB Movie Reviews Dataset

Dataset on HF License: MIT Size Language

A balanced sentiment analysis dataset with 50,000 IMDB movie reviews

Overview β€’ Dataset Structure β€’ Statistics β€’ Usage β€’ Citation


πŸ“– Overview

This dataset contains 50,000 movie reviews from IMDB, perfectly balanced between positive and negative sentiments. Each review includes the original text, reviewer rating (1-10), sentiment label, and source URL, making it ideal for sentiment analysis, text classification, and NLP research.

✨ Key Features

Feature Description
🎯 Perfectly Balanced 25,000 positive + 25,000 negative reviews
⭐ Rating Included Original 1-10 reviewer ratings preserved
πŸ”— Source URLs Links to 7,036 unique movies
πŸ“ Rich Text Average 227 words per review
βœ… Clean Data Zero missing values

πŸ“Š Dataset Structure

Data Fields

Column Type Description
review string Full text of the movie review
movie_url string IMDB URL of the reviewed movie
reviewer_rating int64 Rating given by reviewer (1-10 scale)
label string Sentiment label (Positive or Negative)

Sample Data

{
    "review": "This movie was absolutely fantastic! The acting was superb...",
    "movie_url": "https://www.imdb.com/title/tt0111161/",
    "reviewer_rating": 9,
    "label": "Positive"
}

πŸ“ˆ Statistics

Basic Information

Metric Value
Total Reviews 50,000
Total Columns 4
Memory Usage 74.68 MB
Missing Values 0 (Clean!)

Label Distribution

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Negative  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  25,000 (50%)
β”‚  Positive  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  25,000 (50%)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Label Count Percentage
Negative 25,000 50.0%
Positive 25,000 50.0%

⭐ Reviewer Rating Statistics

Statistic Value
Mean 5.50
Std Dev 3.48
Min 1
Max 10
Median 5.5

Rating Distribution

Rating Count Visualization
1 10,122 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
2 4,586 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
3 4,961 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
4 5,331 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
7 4,803 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
8 5,859 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
9 4,607 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
10 9,731 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ

πŸ“ Review Text Statistics

Metric Characters Words
Average 1,285 227
Minimum 32 4
Maximum 13,584 2,450

🎬 Movie Coverage

Metric Value
Unique Movies 7,036
Avg Reviews per Movie 7.11

πŸš€ Usage

Loading with Hugging Face Datasets

from datasets import load_dataset

# Load the dataset
dataset = load_dataset("Omarrran/50k_IMBD_Movie_Review_by_HNM")

# Access the data
train_data = dataset['train']

# View first example
print(train_data[0])

Loading with Pandas

import pandas as pd
from datasets import load_dataset

dataset = load_dataset("Omarrran/50k_IMBD_Movie_Review_by_HNM")
df = dataset['train'].to_pandas()

# Explore
print(f"Shape: {df.shape}")
print(df.head())

Quick Sentiment Classification Example

from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import classification_report

# Prepare data
X = df['review']
y = df['label']

# Split
X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42, stratify=y
)

# Vectorize
vectorizer = TfidfVectorizer(max_features=10000, stop_words='english')
X_train_vec = vectorizer.fit_transform(X_train)
X_test_vec = vectorizer.transform(X_test)

# Train
clf = LogisticRegression(max_iter=1000)
clf.fit(X_train_vec, y_train)

# Evaluate
print(classification_report(y_test, clf.predict(X_test_vec)))

Fine-tuning Transformers

from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import TrainingArguments, Trainer

# Load model and tokenizer
model_name = "distilbert-base-uncased"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=2)

# Tokenize dataset
def tokenize_function(examples):
    return tokenizer(examples["review"], padding="max_length", truncation=True)

tokenized_dataset = dataset.map(tokenize_function, batched=True)

# Train (simplified)
training_args = TrainingArguments(
    output_dir="./results",
    num_train_epochs=3,
    per_device_train_batch_size=16,
)

trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=tokenized_dataset["train"],
)

trainer.train()

🎯 Suitable Tasks

Task Description
πŸ” Sentiment Analysis Binary classification (Positive/Negative)
πŸ“Š Rating Prediction Predict 1-10 rating from review text
πŸ“ Text Classification Multi-class or multi-label classification
πŸ€– Language Modeling Fine-tune GPT/BERT on movie domain
πŸ“ˆ Feature Extraction Extract embeddings for downstream tasks
πŸ”¬ NLP Research Benchmark models on balanced dataset

⚠️ Limitations

  • English language only
  • Movie reviews domain (may not generalize to other domains)
  • User-generated content with varying quality
  • Temporal bias based on collection period
  • Ratings 5 and 6 are underrepresented (polarized dataset)

πŸ“œ Citation

If you use this dataset in your research, please cite:

@dataset{50k_IMDB_Movie_Review_by_HNM,
  title     = {50K IMDB Movie Reviews Dataset},
  author    = {Haq Nawaz Malik},
  year      = {2025},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/datasets/Omarrran/50k_IMBD_Movie_Review_by_HNM}
}

πŸ“„ License

This dataset is provided for research and educational purposes under the MIT License.


Created by Haq Nawaz Malik

⭐ If you find this dataset useful, please consider giving it a star!

Downloads last month
15