Alaamer commited on
Commit
51f6bf1
·
verified ·
1 Parent(s): 5f21621

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +75 -132
README.md CHANGED
@@ -1,132 +1,75 @@
1
- ---
2
- license: mit
3
- configs:
4
- - config_name: default
5
- data_files:
6
- - split: train
7
- path: data/train-*
8
- dataset_info:
9
- features:
10
- - name: audioVersionDurationSec
11
- dtype: float64
12
- - name: codeBlock
13
- dtype: string
14
- - name: codeBlockCount
15
- dtype: float64
16
- - name: collectionId
17
- dtype: string
18
- - name: createdDate
19
- dtype: string
20
- - name: createdDatetime
21
- dtype: string
22
- - name: firstPublishedDate
23
- dtype: string
24
- - name: firstPublishedDatetime
25
- dtype: string
26
- - name: imageCount
27
- dtype: float64
28
- - name: isSubscriptionLocked
29
- dtype: bool
30
- - name: language
31
- dtype: string
32
- - name: latestPublishedDate
33
- dtype: string
34
- - name: latestPublishedDatetime
35
- dtype: string
36
- - name: linksCount
37
- dtype: float64
38
- - name: postId
39
- dtype: string
40
- - name: readingTime
41
- dtype: float64
42
- - name: recommends
43
- dtype: float64
44
- - name: responsesCreatedCount
45
- dtype: float64
46
- - name: socialRecommendsCount
47
- dtype: float64
48
- - name: subTitle
49
- dtype: string
50
- - name: tagsCount
51
- dtype: float64
52
- - name: text
53
- dtype: string
54
- - name: title
55
- dtype: string
56
- - name: totalClapCount
57
- dtype: float64
58
- - name: uniqueSlug
59
- dtype: string
60
- - name: updatedDate
61
- dtype: string
62
- - name: updatedDatetime
63
- dtype: string
64
- - name: url
65
- dtype: string
66
- - name: vote
67
- dtype: bool
68
- - name: wordCount
69
- dtype: float64
70
- - name: publicationdescription
71
- dtype: string
72
- - name: publicationdomain
73
- dtype: string
74
- - name: publicationfacebookPageName
75
- dtype: string
76
- - name: publicationfollowerCount
77
- dtype: float64
78
- - name: publicationname
79
- dtype: string
80
- - name: publicationpublicEmail
81
- dtype: string
82
- - name: publicationslug
83
- dtype: string
84
- - name: publicationtags
85
- dtype: string
86
- - name: publicationtwitterUsername
87
- dtype: string
88
- - name: tag_name
89
- dtype: string
90
- - name: slug
91
- dtype: string
92
- - name: name
93
- dtype: string
94
- - name: postCount
95
- dtype: float64
96
- - name: author
97
- dtype: string
98
- - name: bio
99
- dtype: string
100
- - name: userId
101
- dtype: string
102
- - name: userName
103
- dtype: string
104
- - name: usersFollowedByCount
105
- dtype: float64
106
- - name: usersFollowedCount
107
- dtype: float64
108
- - name: scrappedDate
109
- dtype: float64
110
- - name: claps
111
- dtype: string
112
- - name: reading_time
113
- dtype: float64
114
- - name: link
115
- dtype: string
116
- - name: Title
117
- dtype: string
118
- - name: Text
119
- dtype: string
120
- - name: authors
121
- dtype: string
122
- - name: timestamp
123
- dtype: string
124
- - name: tags
125
- dtype: string
126
- splits:
127
- - name: train
128
- num_bytes: 2658279478
129
- num_examples: 444593
130
- download_size: 1482660516
131
- dataset_size: 2658279478
132
- ---
 
1
+ # Medium Articles Dataset Generator
2
+
3
+ This project combines multiple datasets from Kaggle and Hugging Face to create a comprehensive collection of Medium articles. The combined dataset is available on [Hugging Face Hub](https://huggingface.co/datasets/Alaamer/medium-articles-posts-with-content).
4
+
5
+ ## Dataset Description
6
+
7
+ This dataset is a unique compilation that not only combines multiple sources but also ensures data quality through normalization and deduplication. A key feature is that all entries in the `text` column are unique - there are no duplicate articles in the final dataset.
8
+
9
+ ### Data Sources:
10
+ #### Kaggle Sources:
11
+ - aiswaryaramachandran/medium-articles-with-content
12
+ - hsankesara/medium-articles
13
+ - meruvulikith/1300-towards-datascience-medium-articles-dataset
14
+
15
+ #### Hugging Face Sources:
16
+ - fabiochiu/medium-articles
17
+ - Falah/medium_articles_posts
18
+
19
+ ## Features
20
+
21
+ - Combines multiple data sources into a single, unified dataset
22
+ - **Ensures uniqueness**: Each article appears only once in the dataset
23
+ - **Quality control**:
24
+ - Removes duplicate entries based on article text
25
+ - Handles missing values
26
+ - Normalizes data format
27
+ - Saves the final dataset in efficient Parquet format
28
+ - Publishes the dataset to Hugging Face Hub
29
+
30
+ ## Requirements
31
+
32
+ ```bash
33
+ pip install datasets
34
+ pip install kagglehub huggingface_hub tqdm
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ 1. Set up your Hugging Face authentication token
40
+ 2. Run the script:
41
+ ```bash
42
+ python combined_medium_ds_generator.py
43
+ ```
44
+
45
+ ## Data Processing Steps
46
+
47
+ 1. Downloads datasets from Kaggle and Hugging Face
48
+ 2. Normalizes each dataset by:
49
+ - Removing null values
50
+ - Eliminating duplicates
51
+ - Standardizing column names
52
+ 3. Combines all datasets into a single DataFrame
53
+ 4. Saves the result as a Parquet file
54
+ 5. Uploads the final dataset to Hugging Face Hub
55
+
56
+ ## Contributing
57
+
58
+ Contributions are welcome! Please feel free to submit a Pull Request.
59
+
60
+ ## License
61
+
62
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
63
+
64
+ ## Author
65
+
66
+ - [@Alaamer](https://huggingface.co/Alaamer)
67
+
68
+ ## Acknowledgments
69
+
70
+ Special thanks to the original dataset creators:
71
+ - aiswaryaramachandran
72
+ - hsankesara
73
+ - meruvulikith
74
+ - fabiochiu
75
+ - Falah