CoolFace
Datasetpublic

Arshia82sbn/youtube-sentiment-dataset

YouTube Comments Sentiment Dataset A comprehensive, large-scale dataset featuring 1,032,225 English YouTube comments, curated and labeled for 3-class sentiment analysis (Negative, Neutral, and Positive). This dataset is optimized for training, evaluating, and fine-tuning Transformer-based NLP models and sentence encoders. ๐Ÿ”— Related Resources Hugging Face Dataset: Arshia82sbn/youtube-sentiment-dataset Hugging Face Model:โ€ฆ See the full description on the dataset page: https://huggingface.co/datasets/Arshia82sbn/youtube-sentiment-dataset.

sourceHugging Facecc-by-4.0updated 1mo agoView on Hugging Face
0likes18downloads
Dataset Card

YouTube Comments Sentiment Dataset

A comprehensive, large-scale dataset featuring 1,032,225 English YouTube comments, curated and labeled for 3-class sentiment analysis (Negative, Neutral, and Positive). This dataset is optimized for training, evaluating, and fine-tuning Transformer-based NLP models and sentence encoders.

๐Ÿ”— Related Resources


Dataset Description

AttributeValue
Total Samples1,032,225
After Cleaning1,022,514
LanguageEnglish
Labels3 classes: Negative (0), Neutral (1), Positive (2)
ColumnsVideoTitle, CommentText, Sentiment, Sentiment_label, clean_comment_text, tokens_comment_text, clean_title, token_title

Class Distribution

ClassCountPercentage
Negative (0)343,25733.6%
Neutral (1)337,43233.0%
Positive (2)341,82533.4%

Split

SplitSamples
Train (70%)715,759
Test (15%)153,377
Validation (15%)153,378

Columns Definition

  • โ€”VideoTitle โ€” Original title of the source YouTube video.
  • โ€”CommentText โ€” Raw user comment text.
  • โ€”Sentiment โ€” Categorical text label (Negative, Neutral, Positive).
  • โ€”Sentiment_label โ€” Numeric target label (0 for Negative, 1 for Neutral, 2 for Positive).
  • โ€”clean_comment_text โ€” Normalized and noise-reduced comment text.
  • โ€”tokens_comment_text โ€” Lemmatized/tokenized list representation of the comment.
  • โ€”clean_title โ€” Normalized video title text.
  • โ€”token_title โ€” Lemmatized/tokenized list representation of the video title.

Usage

Using Hugging Face datasets

python
from datasets import load_dataset

# Load directly from the Hugging Face Hub
dataset = load_dataset("Arshia82sbn/youtube-sentiment-dataset")

print(dataset)
print("Sample record:", dataset["train"][0])

Using pandas

python
import pandas as pd

# If loaded from local CSV or Parquet export
df = pd.read_csv("youtube-comments-sentiment.csv")
print(f"Total samples: {len(df)}")
print(df.head())

Model Inference

A pre-trained MPNet classifier built on this dataset is available:

python
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("Arshia82sbn/youtube-sentiment-classifier-english-mpnet")
embeddings = model.encode(["This video was incredibly helpful!", "Terrible content, waste of time."])
print(embeddings.shape)

License

This dataset is released for academic, research, and educational purposes.