Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,132 +1,75 @@
|
|
| 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 |
-
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|