psyrishi commited on
Commit
a802833
Β·
verified Β·
1 Parent(s): c0e7d5e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +156 -3
README.md CHANGED
@@ -1,3 +1,156 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ 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
+ ---