Datasets:
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 18 new columns ({'type_token_ratio', 'avg_word_length', 'has_stress_keyword', 'has_help_keyword', 'noun_ratio', 'num_emojis', 'polarity', 'adv_ratio', 'has_suicidal_keyword', 'text_length', 'word_count', 'adj_ratio', 'num_urls', 'num_excess_punct', 'stopword_ratio', 'num_special_chars', 'verb_ratio', 'subjectivity'})
This happened while the csv dataset builder was generating data using
hf://datasets/ourafla/Mental-Health_Text-Classification_Dataset/mental_health_feature_engineered.csv (at revision e47ef4f68a0d28d9f174cb8af2323400b14f1a73)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 714, in write_table
pa_table = table_cast(pa_table, self._schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
Unique_ID: double
text: string
status: string
text_length: double
word_count: double
num_urls: double
num_emojis: double
num_special_chars: double
num_excess_punct: double
avg_word_length: double
stopword_ratio: double
type_token_ratio: double
polarity: double
subjectivity: double
noun_ratio: double
verb_ratio: double
adj_ratio: double
adv_ratio: double
has_suicidal_keyword: string
has_stress_keyword: string
has_help_keyword: string
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 2875
to
{'Unique_ID': Value('float64'), 'text': Value('string'), 'status': Value('string')}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1339, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 972, in convert_to_parquet
builder.download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 894, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 970, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1833, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 18 new columns ({'type_token_ratio', 'avg_word_length', 'has_stress_keyword', 'has_help_keyword', 'noun_ratio', 'num_emojis', 'polarity', 'adv_ratio', 'has_suicidal_keyword', 'text_length', 'word_count', 'adj_ratio', 'num_urls', 'num_excess_punct', 'stopword_ratio', 'num_special_chars', 'verb_ratio', 'subjectivity'})
This happened while the csv dataset builder was generating data using
hf://datasets/ourafla/Mental-Health_Text-Classification_Dataset/mental_health_feature_engineered.csv (at revision e47ef4f68a0d28d9f174cb8af2323400b14f1a73)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Unique_ID
float64 | text
string | status
string |
|---|---|---|
0
|
oh my gosh
|
Anxiety
|
1
|
trouble sleeping, confused mind, restless heart. All out of tune
|
Anxiety
|
2
|
All wrong, back off dear, forward doubt. Stay in a restless and restless place
|
Anxiety
|
3
|
I've shifted my focus to something else but I'm still worried
|
Anxiety
|
4
|
I'm restless and restless, it's been a month now, boy. What do you mean?
|
Anxiety
|
5
|
every break, you must be nervous, like something is wrong, but what the heck
|
Anxiety
|
6
|
I feel scared, anxious, what can I do? And may my family or us be protected :)
|
Anxiety
|
7
|
Have you ever felt nervous but didn't know why?
|
Anxiety
|
8
|
I haven't slept well for 2 days, it's like I'm restless. why huh :([].
|
Anxiety
|
9
|
I'm really worried, I want to cry.
|
Anxiety
|
10
|
always restless every night, even though I don't know why, what's wrong. strange.
|
Anxiety
|
11
|
I'm confused, I'm not feeling good lately. Every time I want to sleep, I always feel restless
|
Anxiety
|
12
|
sometimes what is needed when there is a problem is to laugh until you forget that there is a problem, when you remember it, you feel restless like that well, it turns out that I still have a sad burden blah blah blah
|
Anxiety
|
13
|
Because this worry is you.
|
Anxiety
|
14
|
Sometimes it's your own thoughts that make you anxious and afraid to close your eyes until you don't sleep
|
Anxiety
|
15
|
Every time I wake up, I'm definitely nervous and excited, until when are you going to try ™‚
|
Anxiety
|
16
|
I can only hope, even though I'm worried if it starts like this....
|
Anxiety
|
17
|
restive = restless, restless
|
Anxiety
|
18
|
"No regrets or grudges/angry at things that have passed, and not worrying too much about the future, that's true serenity."
|
Anxiety
|
19
|
If the guy is sick, the girl actually feels sick indirectly. He must be feeling restless and restless. :')
|
Anxiety
|
20
|
I've been the most anxious person before I became the most sincere person, I've also been the most worried person before it all ended
|
Anxiety
|
21
|
Successfully online at 9am. Even sleeping in a state of restlessness what is wrong with me
|
Anxiety
|
22
|
Can't sleep. Just restless by nature
|
Anxiety
|
23
|
Already worried about picking up the phone
|
Anxiety
|
24
|
a little restless. a little restless. always feel guilty. sorry if i can't be the best as i've been :'
|
Anxiety
|
25
|
I've been so restless since this morning
|
Anxiety
|
26
|
it makes you feel restless
|
Anxiety
|
27
|
Sleepy but restless when you sleep
|
Anxiety
|
28
|
Why is this cave... I'm already in a bad mood and then my heart seems to be beating really fast... I'm really nervous. Is there something wrong???
|
Anxiety
|
29
|
He is very busy, He is restless, geez, what's going on?
|
Anxiety
|
30
|
I'm broken and fragile, I'm hurt, I can't stand the anxiety anymore, I can't stand the love. Until now I was ignored, not seen, even left far away. I'm not like what he wants, so I'll just step back.
|
Anxiety
|
31
|
# Suggest a song that makes you calm, don't know why suddenly this feeling of anger / restlessness appears. Thanks!
|
Anxiety
|
32
|
Terooosss nervous huuuu
|
Anxiety
|
33
|
why today's heart doesn't feel good..jealous?.anxious?.disappointed?.feeling failed?
|
Anxiety
|
34
|
It's a habit from elementary school if I think about something I'll get worried I can't sleep
|
Anxiety
|
35
|
Since yesterday yesterday, I have not been in the mood, very sensitive, feeling restless, always surprised and many surprises every day that almost make my brain explode, everyone is the target of ups and downs in mood. But today I feel very grateful that this lecture drama is over.
|
Anxiety
|
36
|
Tonight he continues to chatter about money, I'm so confused what to do. Once he said don't worry about money, but he kept blabbering about money.
|
Anxiety
|
37
|
Feeling so restless lately.
|
Anxiety
|
38
|
Oh god I'm restless
|
Anxiety
|
39
|
but my heart is still restless even though my mouth is talking
|
Anxiety
|
40
|
waiting for uncertainty, please be anxious
|
Anxiety
|
41
|
been the most anxious person, before becoming the most sincere person
|
Anxiety
|
42
|
Did you ever read it when you read it to RL, I mean the atmosphere, the taste. It's because I'm like this. when I read au, the topic was about mental illness ™ my days became restless....and now I'm scared.
|
Anxiety
|
43
|
Hi, I want to tell you... Lately I've been feeling restless, have trouble sleeping, I searched on google it says it's a mild symptom of depression, I used to tell my mom a psychologist friend "don't think too much, it's not important you get depressed easily" then I frequent irregular breathing.
|
Anxiety
|
44
|
I've been feeling restless for the past few days, now I'm nauseous, like someone...
|
Anxiety
|
45
|
Oh no I'm restless. The time will come. I walk with Jesus. Then my heart is calm.. Every time I sing a song I don't know, tomorrow in this section I always want to cry . Because I sing it but I don't do it . Sorry God I worry too much ️
|
Anxiety
|
46
|
Controlling anxiety is not as easy as it sounds.
|
Anxiety
|
47
|
Since the pandemic, I haven't opened my laptop for a day, I feel restless, I have a very heavy life load
|
Anxiety
|
48
|
People who are restless and afraid can be seen from the frequent touching of the face and ringing the fingers.
|
Anxiety
|
49
|
I don't know if my mind breaks down, but I don't want to think about it :( , why do I feel restless?
|
Anxiety
|
50
|
Sensitive feelings make the heart restless.
|
Anxiety
|
51
|
Let's not be nervous, how about ™‚
|
Anxiety
|
52
|
after being confessed, I'm really nervous
|
Anxiety
|
53
|
Restless.. and.. restless..
|
Anxiety
|
54
|
This is the first time I've had an anxiety disorder in my sleep, and it wasn't really good. Even though I'm not thinking about anything, but I'm restless
|
Anxiety
|
55
|
It's been a week I feel restless and my head feels full I want to rest while I sleep
|
Anxiety
|
56
|
why am i nervous
|
Anxiety
|
57
|
Anxious, all afraid, afraid of war, afraid of economic crisis, afraid of air pollution, disease outbreaks, clean water, etc. When are you happy?
|
Anxiety
|
58
|
oh my god why are you so nervous
|
Anxiety
|
59
|
feelings of restlessness have started to appear ±
|
Anxiety
|
60
|
Very restless bgsd
|
Anxiety
|
61
|
The days are full of restlessness, with income that doesn't know the direction..Hopefully we can always get what we need and be given the advantage for a desire...5 - 5 - 21
|
Anxiety
|
62
|
1 hour wake up 1 hour wake up ngde the restless is here kle cak after polishing dwg
|
Anxiety
|
63
|
Lately everything has been all of a sudden, suddenly happy, suddenly sad, suddenly anxious, suddenly relaxed, suddenly excited, suddenly lethargic, etc. I really don't like everything that is impromptu, yes, but what can I do? Ha ha ha
|
Anxiety
|
64
|
I'm so sorry, but can you give me words of encouragement or not? I'm really worried that I can't make my kids happy.
|
Anxiety
|
65
|
I don't like worrying, I don't like wehhh!
|
Anxiety
|
66
|
Behind your online, there is a heart that is anxiously waiting to hear from you
|
Anxiety
|
67
|
nervous restless peramoy
|
Anxiety
|
68
|
I'm nervous I don't know why. I don't feel calm
|
Anxiety
|
69
|
Sometimes I can't even rest. Always worried, worried about this, even though I'm tired
|
Anxiety
|
70
|
It feels uneasy.
|
Anxiety
|
71
|
I'm so restless, I don't know why
|
Anxiety
|
72
|
Day by day, that hope grows, the closer I feel, the more I expect from you, and sometimes I get anxious because of it. To the point that I became worried, worried that it would disturb my hopes. Especially disturbing km.
|
Anxiety
|
73
|
Urmi has a fever, I'm already sad and restless.. What's more, this little girl has a fever, ha ha ha
|
Anxiety
|
74
|
How many days have you been feeling restless at night and in the afternoon your mind is empty, why?
|
Anxiety
|
75
|
From now on, it's not really good, being restless is tired by nature
|
Anxiety
|
76
|
I haven't slept yet, and now my head hurts so bad. I'm sleepy, but I can't sleep, I've tried to brake but I'm restless
|
Anxiety
|
77
|
Too anxious. Too worried. Too scared
|
Anxiety
|
78
|
Restless and agitated.
|
Anxiety
|
79
|
There will always be calm in the midst of restlessness
|
Anxiety
|
80
|
dismayed = disappointed, anxious
|
Anxiety
|
81
|
This is why my heart is beating so fast. Very restless. But I don't know what I'm worried about. It's a great feeling.....
|
Anxiety
|
82
|
More restless. Hopefully those who are there are okay.... Oh Allah protect him..... Amen, robbal alamin
|
Anxiety
|
83
|
If my friends have replied to my tweet that has an opinion, I'm worried
|
Anxiety
|
84
|
I'm hungry, weak, lethargic, restless.
|
Anxiety
|
85
|
Sudden restlessness. Why are you..
|
Anxiety
|
86
|
Sleeps 3 hours, rest restless. Try a variety of positions and ways never fall asleep. I really need to be able to control this mind.
|
Anxiety
|
87
|
STOP I'M GAMAU ANXIETY, GUNDAH GULANA AGAIN
|
Anxiety
|
89
|
It's so restless work
|
Anxiety
|
90
|
Is there anyone who, when sick, can't sleep well, but sleeps restlessly?
|
Anxiety
|
91
|
Please worry until you want to cry
|
Anxiety
|
92
|
Exam on Saturday. Saturday's Starting Presentation..On Going: CT.Place CSE Dept. .Assignments….AND UNTIL NOW CLEAR CATIA TRAINING 2 PRODUCTS HAHAHAHA.. awesome, still in sleep mode, but I'm nervous, haha
|
Anxiety
|
93
|
I'm nervous, when you come change anxiety and become anxious, I'm more worried. Tomorrow I will try to live without news from you again, quickly go away from my insincerity.
|
Anxiety
|
94
|
How worried am I? *asked my other self. Until it was sent, sustenance had a good friend. Moved
|
Anxiety
|
95
|
Restless due to imagining too long and high until lazy to sleep.
|
Anxiety
|
96
|
It's like something's up, something's weird, but I don't know what, it feels so restless.
|
Anxiety
|
97
|
"No regrets or grudges/angry at things that have passed, and not worrying too much about the future, that's true serenity."
|
Anxiety
|
98
|
For God's sake, I'm so tired of worrying.
|
Anxiety
|
99
|
For 3 years comfortable with this condition, anxiously wondering if a few days later everything will change? I don't know, another crisis of confidence
|
Anxiety
|
100
|
Feeling a little anxious today.
|
Anxiety
|
Mental Health Text Classification Dataset (4-Class)
Dataset Description
This dataset contains short, user‑generated texts labeled for 4‑class mental health classification: Suicidal, Depression, Anxiety, and Normal. It is a derived dataset created by combining and cleaning three public mental‑health corpora, then re‑labeling them into a unified 4‑class scheme and exporting CSV files suitable for both classical ML and modern NLP models.
The repository includes:
- An unbalanced main training corpus (realistic class skew).
- A strictly balanced test split for fair evaluation.
- A feature‑engineered file with basic text statistics (length, URLs, emojis, punctuation, etc.).
Important: This dataset is intended for research and education only. It is not a clinical tool and must not be used for real‑world diagnosis, triage, or crisis intervention.
Dataset Structure
Files
mental_heath_unbanlanced.csv- Main training corpus with 48,945 samples and a realistic, unbalanced class distribution (Normal, Depression, Suicidal, Anxiety).
- Columns:
text– Cleaned post or statement text.status– Final label in {Suicidal,Depression,Anxiety,Normal}.
mental_health_combined_test.csv- Balanced test split with 992 samples (exactly 248 per class).
- Columns:
text– Cleaned post.status– Final 4‑class label.
- Built by combining held‑out data from the sources, applying the same cleaning and label mapping, removing duplicates, and downsampling each class to equal size for fair evaluation.
mental_health_feature_engineered.csv- Cleaned and feature‑engineered subset for classical models and analysis.
- Columns:
- Core:
Unique_ID,text,status(4‑class label). - Features:
text_length– Number of characters.word_count– Number of whitespace‑separated tokens.num_urls– Count of URL patterns.num_emojis– Count of emoji characters.num_special_chars– Count of non‑alphanumeric characters.num_excess_punct– Count of repeated punctuation sequences (e.g.,!!!,???,...).avg_word_length– Average characters per word.
- Core:
Splits
This repo is organized at the file level (no HF train/test config baked in). A common convention is:
mental_heath_unbanlanced.csv→train(and derive your own validation split).mental_health_combined_test.csv→test.
Example with datasets:
from datasets import load_dataset
ds_train = load_dataset( "your-username/Mental-Health_Text-Classification_Dataset", data_files={"train": "mental_heath_unbanlanced.csv"}, )
ds_test = load_dataset( "your-username/Mental-Health_Text-Classification_Dataset", data_files={"test": "mental_health_combined_test.csv"}, )
print(ds_train) print(ds_test)
text
For the feature file:
ds_fe = load_dataset( "your-username/Mental-Health_Text-Classification_Dataset", data_files={"feature": "mental_health_feature_engineered.csv"}, )
text
Source Data and Provenance
This dataset does not collect new data from individuals. Instead, it is built by downloading, cleaning, and merging three existing public resources.[file:64][file:65]
Source datasets:
Suicide and Depression Detection (Kaggle) – Nikhileswar Komati
Reddit posts from suicide‑related communities labeled as suicidal vs non‑suicidal / depression vs control.
https://www.kaggle.com/datasets/nikhileswarkomati/suicide-watchSentiment Analysis for Mental Health (Kaggle) – Suchintika Sarkar
Short statements labeled as normal, depression, suicide, anxiety, stress, bipolarity, personality disorder, etc.
https://www.kaggle.com/datasets/suchintikasarkar/sentiment-analysis-for-mental-healthReddit Mental Health Classification (Murarka et al.)
Dataset released with “Detection and Classification of Mental Illnesses on Social Media using RoBERTa.”
Reddit posts labeled into ADHD, Anxiety, Bipolar, Depression, PTSD, and None.
https://github.com/amurark/mental-health-detection
Only the processed, relabeled, and re‑split samples are redistributed here. Users must obtain the original raw data from the links above if needed.
Preprocessing and Label Mapping
Cleaning
All source datasets are passed through a common cleaning pipeline:
- Drop rows with missing
textor labels (status). - Deduplicate texts across and within sources.
- Apply regex‑based text normalization (whitespace cleanup, formatting fixes).
- Filter out extremely short and excessively long texts to remove non‑informative samples.
Unified 4‑Class Labels
Original labels vary widely (suicide vs non, multiple disorders, control). They are mapped to a four‑class scheme:
- Suicidal – Posts explicitly labeled as suicide / suicidal ideation.
- Depression – Posts labeled as depression / depressed.
- Anxiety – Posts labeled with anxiety‑related categories.
- Normal – Control / non‑suicide / normal posts.
Samples whose labels cannot be clearly mapped (e.g., stress, bipolar, personality disorder, PTSD, mixed or ambiguous labels) are discarded to keep the final label space clean.
Splits and Balance
- The main training file (
mental_heath_unbanlanced.csv) preserves the natural class imbalance after cleaning and mapping. - The balanced test file (
mental_health_combined_test.csv) is created by:- Building a held‑out pool from the sources.
- Applying the same cleaning and label mapping.
- Removing duplicates.
- Downsampling each class to 248 samples for a total of 992 rows.
The feature‑engineered file is generated from the cleaned sentiment subset by adding the numerical text features listed above.
Intended Uses
Primary Uses
- Research and teaching on mental‑health‑related text classification.
- Benchmarking binary or multi‑class classifiers (especially 4‑class).
- Studying the impact of class imbalance, basic feature engineering, and model robustness on noisy social‑media text.
Typical tasks:
- 4‑way text classification: Suicidal vs Depression vs Anxiety vs Normal.
- Ablation studies: raw text vs text + simple features (from the feature‑engineered file).
- Transfer learning experiments on mental‑health Reddit data.
Out‑of‑Scope Uses
- Clinical decision‑making, diagnosis, or risk assessment.
- Any deployment that might influence real‑world medical, therapeutic, or crisis‑intervention workflows.
- Individual‑level profiling, surveillance, or moderation without appropriate human review and safeguards.
Ethical Considerations and Limitations
- Non‑clinical labels: Labels are derived from subreddit context and dataset creators’ heuristics, not formal diagnoses by clinicians.
- Domain bias: Content is mostly from Reddit and similar platforms; models may not generalize to clinical notes, private messages, or other domains.
- Demographic unknowns: There is no reliable demographic metadata; potential demographic, cultural, or linguistic biases cannot be quantified.
- No guarantee of harm‑free samples: Text may contain distressing content, including mentions of self‑harm or suicide; users should handle and share it with care, especially in teaching settings.
Users are encouraged to:
- Use this dataset only in controlled research/educational environments.
- Avoid building systems that auto‑label individual users in high‑stakes contexts without expert oversight.
- Follow your institution’s ethics and IRB/IEC guidelines where applicable.
Citation
Please cite the original datasets and this derived dataset.
Original datasets
Komati, N. Suicide and Depression Detection [Dataset]. Kaggle.
https://www.kaggle.com/datasets/nikhileswarkomati/suicide-watchSarkar, S. Sentiment Analysis for Mental Health [Dataset]. Kaggle.
https://www.kaggle.com/datasets/suchintikasarkar/sentiment-analysis-for-mental-healthMurarka, A., Radhakrishnan, B., & Ravichandran, S. (2021). Detection and Classification of Mental Illnesses on Social Media using RoBERTa [Dataset and code]. GitHub.
https://github.com/amurark/mental-health-detection
This derived dataset
Mukherjee, P. (2025). Mental Health Text Classification Dataset (4‑Class) [Dataset]. Hugging Face Hub.
https://huggingface.co/datasets/ourafla/Mental-Health_Text-Classification_Dataset.
- Downloads last month
- 25