beshiribrahim commited on
Commit
7f563a2
·
verified ·
1 Parent(s): 689adda

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -217
README.md CHANGED
@@ -5,125 +5,19 @@ language:
5
  task_categories:
6
  - translation
7
  ---
8
- <br>
9
 
10
- <!DOCTYPE html>
11
- <html lang="en">
12
- <head>
13
- <meta charset="UTF-8">
14
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
15
- <title>Dataset Analysis</title>
16
- <style>
17
- body {
18
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
19
- background-color: #f0f2f5;
20
- color: #333;
21
- line-height: 1.6;
22
- margin: 0;
23
- padding: 20px;
24
- }
25
- .container {
26
- max-width: 900px;
27
- margin: auto;
28
- background: #fff;
29
- padding: 25px 30px;
30
- border-radius: 12px;
31
- box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
32
- }
33
- h1, h2, h3 {
34
- color: #2c3e50;
35
- border-bottom: 2px solid #e0e0e0;
36
- padding-bottom: 10px;
37
- margin-top: 25px;
38
- }
39
- pre {
40
- background-color: #f4f4f9;
41
- border: 1px solid #ddd;
42
- border-left: 5px solid #007bff;
43
- padding: 15px;
44
- overflow-x: auto;
45
- font-family: 'Courier New', Courier, monospace;
46
- white-space: pre-wrap;
47
- word-wrap: break-word;
48
- border-radius: 8px;
49
- }
50
- table {
51
- width: 100%;
52
- border-collapse: collapse;
53
- margin: 20px 0;
54
- font-size: 1em;
55
- text-align: left;
56
- border-radius: 8px;
57
- overflow: hidden;
58
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
59
- }
60
- th, td {
61
- padding: 12px 15px;
62
- border-bottom: 1px solid #ddd;
63
- }
64
- thead tr {
65
- background-color: #007bff;
66
- color: #ffffff;
67
- text-align: left;
68
- }
69
- tbody tr:nth-child(even) {
70
- background-color: #f2f2f2;
71
- }
72
- tbody tr:hover {
73
- background-color: #e9ecef;
74
- cursor: pointer;
75
- }
76
- .code-block {
77
- margin-bottom: 20px;
78
- background: #2d2d2d;
79
- color: #f8f8f2;
80
- padding: 15px;
81
- border-radius: 8px;
82
- overflow-x: auto;
83
- }
84
- .code-block code {
85
- font-family: 'Fira Code', 'JetBrains Mono', monospace;
86
- font-size: 0.9em;
87
- }
88
- .section-title {
89
- display: flex;
90
- align-items: center;
91
- gap: 10px;
92
- margin-bottom: 15px;
93
- font-size: 1.5em;
94
- font-weight: bold;
95
- }
96
- .info-box {
97
- background-color: #eaf6ff;
98
- border-left: 5px solid #007bff;
99
- padding: 15px;
100
- border-radius: 8px;
101
- margin-bottom: 20px;
102
- }
103
- </style>
104
- </head>
105
- <body>
106
 
107
- <div class="container">
108
- <header>
109
- <h1>Dataset Analysis Report</h1>
110
- <p>This report presents an analysis of the 'tigre-data-parallel-multilingual' dataset from the Hugging Face Hub, including dataset information and sample distribution by target language.</p>
111
- </header>
112
-
113
- <main>
114
- <section>
115
- <h2>Python Script</h2>
116
- <div class="code-block">
117
- <pre><code>from datasets import load_dataset
118
  import pandas as pd
119
 
120
  # Load dataset from Hugging Face Hub
121
  dataset = load_dataset(
122
- "BeitTigreAI/tigre-data-parallel-multilingual",
123
- data_files={
124
- "train": "train.parquet",
125
- "validation": "validation.parquet"
126
- }
127
  )
128
 
129
  # Print dataset info
@@ -134,112 +28,44 @@ print(dataset)
134
  print("\n🔍 Number of samples per target language:")
135
 
136
  for split in ["train", "validation"]:
137
- print(f"\n➡️ {split.title()} Split:")
138
- df = dataset[split].to_pandas()
139
-
140
- # Count by tgt_lang
141
- lang_counts = df["tgt_lang"].value_counts().to_frame().reset_index()
142
- lang_counts.columns = ["tgt_lang", "count"]
143
- lang_counts["percentage"] = (lang_counts["count"] / lang_counts["count"].sum() * 100).round(2)
144
-
145
- # Print as table
146
- print(lang_counts.to_string(index=False))
147
- </code></pre>
148
- </div>
149
- </section>
150
 
151
- <section>
152
- <div class="section-title">
153
- 📊 Dataset Info:
154
- </div>
155
- <div class="info-box">
156
- <pre><code>DatasetDict({
157
- train: Dataset({
158
- features: ['id', 'src', 'tgt', 'src_lang', 'tgt_lang'],
159
- num_rows: 283180
160
- })
161
- validation: Dataset({
162
- features: ['id', 'src', 'tgt', 'src_lang', 'tgt_lang'],
163
- num_rows: 6964
164
- })
165
- })</code></pre>
166
- </div>
167
- </section>
168
 
169
- <section>
170
- <div class="section-title">
171
- 🔍 Number of samples per target language:
172
- </div>
173
-
174
- <h3>➡️ Train Split:</h3>
175
- <table>
176
- <thead>
177
- <tr>
178
- <th>tgt_lang</th>
179
- <th>count</th>
180
- <th>percentage</th>
181
- </tr>
182
- </thead>
183
- <tbody>
184
- <tr>
185
- <td>eng_Latn</td>
186
- <td>132323</td>
187
- <td>46.73</td>
188
- </tr>
189
- <tr>
190
- <td>deu_Latn</td>
191
- <td>67335</td>
192
- <td>23.78</td>
193
- </tr>
194
- <tr>
195
- <td>ara_Arab</td>
196
- <td>43204</td>
197
- <td>15.26</td>
198
- </tr>
199
- <tr>
200
- <td>swe_Latn</td>
201
- <td>26762</td>
202
- <td>9.45</td>
203
- </tr>
204
- <tr>
205
- <td>nob_Latn</td>
206
- <td>7548</td>
207
- <td>2.67</td>
208
- </tr>
209
- <tr>
210
- <td>nno_Latn</td>
211
- <td>5530</td>
212
- <td>1.95</td>
213
- </tr>
214
- <tr>
215
- <td>tir_Ethi</td>
216
- <td>478</td>
217
- <td>0.17</td>
218
- </tr>
219
- </tbody>
220
- </table>
221
 
222
- <h3>➡️ Validation Split:</h3>
223
- <table>
224
- <thead>
225
- <tr>
226
- <th>tgt_lang</th>
227
- <th>count</th>
228
- <th>percentage</th>
229
- </tr>
230
- </thead>
231
- <tbody>
232
- <tr>
233
- <td>eng_Latn</td>
234
- <td>6964</td>
235
- <td>100.0</td>
236
- </tr>
237
- </tbody>
238
- </table>
239
- </section>
240
- </main>
241
 
242
- </div>
 
 
 
 
 
 
 
 
243
 
244
- </body>
245
- </html>
 
 
5
  task_categories:
6
  - translation
7
  ---
8
+ put this in nice html format
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
+ from datasets import load_dataset
 
 
 
 
 
 
 
 
 
 
12
  import pandas as pd
13
 
14
  # Load dataset from Hugging Face Hub
15
  dataset = load_dataset(
16
+     "BeitTigreAI/tigre-data-parallel-multilingual",
17
+     data_files={
18
+         "train": "train.parquet",
19
+         "validation": "validation.parquet"
20
+     }
21
  )
22
 
23
  # Print dataset info
 
28
  print("\n🔍 Number of samples per target language:")
29
 
30
  for split in ["train", "validation"]:
31
+     print(f"\n➡️  {split.title()} Split:")
32
+     df = dataset[split].to_pandas()
33
+     
34
+     # Count by tgt_lang
35
+     lang_counts = df["tgt_lang"].value_counts().to_frame().reset_index()
36
+     lang_counts.columns = ["tgt_lang", "count"]
37
+     lang_counts["percentage"] = (lang_counts["count"] / lang_counts["count"].sum() * 100).round(2)
38
+     
39
+     # Print as table
40
+     print(lang_counts.to_string(index=False))
41
+
42
+
 
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
+ 📊 Dataset Info:
46
+ DatasetDict({
47
+     train: Dataset({
48
+         features: ['id', 'src', 'tgt', 'src_lang', 'tgt_lang'],
49
+         num_rows: 283180
50
+     })
51
+     validation: Dataset({
52
+         features: ['id', 'src', 'tgt', 'src_lang', 'tgt_lang'],
53
+         num_rows: 6964
54
+     })
55
+ })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
+ 🔍 Number of samples per target language:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
+ ➡️  Train Split:
60
+ tgt_lang  count  percentage
61
+ eng_Latn 132323       46.73
62
+ deu_Latn  67335       23.78
63
+ ara_Arab  43204       15.26
64
+ swe_Latn  26762        9.45
65
+ nob_Latn   7548        2.67
66
+ nno_Latn   5530        1.95
67
+ tir_Ethi    478        0.17
68
 
69
+ ➡️  Validation Split:
70
+ tgt_lang  count  percentage
71
+ eng_Latn   6964       100.0