File size: 4,918 Bytes
a802833 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
---
pretty_name: "MoodPulse: Processed Data and Embeddings for Emotion Analysis"
license: mit
language:
- en
tags:
- emotion-classification
- affective-computing
- text-classification
- goemotions
- distilbert
- embeddings
task_categories:
- text-classification
dataset_info:
source_dataset: "GoEmotions"
includes:
- raw data
- tokenized data
- transformer embeddings
processed_by: "AffectiveLens pipeline"
---
# π MoodPulse: Processed Data and Embeddings for Emotion Analysis
**MoodPulse** provides a self-contained dataset repository for use with the [AffectiveLens](https://github.com/your-username/AffectiveLens) projectβan end-to-end NLP pipeline for emotion detection in text. It includes the full processing stack from raw text to final DistilBERT-based sentence embeddings, allowing researchers to bypass time-consuming preprocessing and directly train or benchmark models.
---
## π§Ύ Dataset Description
This dataset builds upon the original **[GoEmotions](https://github.com/google-research/goemotions)** dataset by Google Research, which includes 58k carefully curated Reddit comments labeled with 28 fine-grained emotions.
In **MoodPulse**, these labels are condensed into **three mutually exclusive emotion classes**:
- Positive
- Neutral
- Negative
The dataset is structured to support every phase of the AffectiveLens pipeline:
- Raw CSVs
- Tokenized data in Hugging Face `datasets` format
- Precomputed `DistilBERT` embeddings
This enables full reproduction of results without requiring re-tokenization or embedding computation.
---
## ποΈ Dataset Structure
The dataset is organized into logical folders corresponding to different stages of processing:
```
/
βββ data/
β βββ full\_dataset/
β β βββ goemotions\_1.csv
β β βββ goemotions\_2.csv
β β βββ goemotions\_3.csv
β β
β βββ processed/
β β βββ GoEmotions\_Tokenized\_Train\_Pool/
β β βββ GoEmotions\_Tokenized\_Test/
β β
β βββ embeddings/
β βββ MentalTrain/
β βββ MentalTest/
````
### π Folder Descriptions
- **`data/full_dataset/`**
Original GoEmotions CSV files split into parts.
- **`data/processed/`**
Tokenized datasets using Hugging Face `datasets` format, ready for embedding extraction.
- **`data/embeddings/`**
Final DistilBERT `[CLS]` token embeddings for the training and test sets. These are saved as Hugging Face datasets and ready for model input.
---
## π How to Use
You can load the tokenized data or precomputed embeddings directly using the Hugging Face `datasets` library.
```python
from datasets import load_dataset
# Define repository ID and folder to load
repo_id = "psyrishi/MoodPulse"
data_folder = "data/embeddings/MentalTrain" # or "data/embeddings/MentalTest"
# Load the dataset split
train_embeddings = load_dataset(repo_id, data_dir=data_folder, split='train')
print("Sample entry:")
print(train_embeddings[0])
# Access embeddings and labels
embedding_vector = train_embeddings[0]['cls_embedding']
label_vector = train_embeddings[0]['labels']
````
> π‘ Tip: You can replace `data_dir` to load the tokenized datasets instead, if desired.
---
## π Use Cases
* Train or benchmark emotion classification models using high-quality, preprocessed embeddings.
* Compare performance of traditional ML models vs. transformer-based models.
* Build emotion-aware applications for mental health, customer feedback, or social media monitoring.
---
## π Citation
This dataset is a **processed derivative** of the original GoEmotions dataset:
```bibtex
@inproceedings{demszky2020goemotions,
title={GoEmotions: A Dataset of Fine-Grained Emotions},
author={Demszky, Dorottya and Movshovitz-Attias, Dana and Ko, Jeongwoo and Cowen, Alan and Nemade, Gaurav and Ravi, Sujith},
booktitle={Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL)},
year={2020}
}
```
If you use **MoodPulse** in your work, please cite both the original GoEmotions authors and link back to this repository.
---
## βοΈ Licensing
* **Original data**: Provided under the **Creative Commons Attribution 4.0 International (CC BY 4.0)** license by Google Research.
* **Code and processing logic**: Provided under the **MIT License**.
Please refer to the [LICENSE](./LICENSE) file for full details.
---
## π Acknowledgments
Special thanks to Google Research for the creation and open release of the GoEmotions dataset, and to the Hugging Face team for providing the open-source tools that made this processing pipeline possible.
---
## π Related Projects
* [GoEmotions Dataset (Google)](https://github.com/google-research/goemotions)
* [AffectiveLens](https://github.com/psywarrior1998/AffectiveLens) β Emotion detection pipeline built on top of this dataset.
---
|