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