Update README.md
Browse files
README.md
CHANGED
|
@@ -5,8 +5,116 @@ language:
|
|
| 5 |
task_categories:
|
| 6 |
- translation
|
| 7 |
---
|
|
|
|
| 8 |
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
import pandas as pd
|
| 11 |
|
| 12 |
# Load dataset from Hugging Face Hub
|
|
@@ -36,12 +144,16 @@ for split in ["train", "validation"]:
|
|
| 36 |
|
| 37 |
# Print as table
|
| 38 |
print(lang_counts.to_string(index=False))
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
|
|
|
| 45 |
train: Dataset({
|
| 46 |
features: ['id', 'src', 'tgt', 'src_lang', 'tgt_lang'],
|
| 47 |
num_rows: 283180
|
|
@@ -50,20 +162,84 @@ DatasetDict({
|
|
| 50 |
features: ['id', 'src', 'tgt', 'src_lang', 'tgt_lang'],
|
| 51 |
num_rows: 6964
|
| 52 |
})
|
| 53 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
| 58 |
-
tgt_lang count percentage
|
| 59 |
-
eng_Latn 132323 46.73
|
| 60 |
-
deu_Latn 67335 23.78
|
| 61 |
-
ara_Arab 43204 15.26
|
| 62 |
-
swe_Latn 26762 9.45
|
| 63 |
-
nob_Latn 7548 2.67
|
| 64 |
-
nno_Latn 5530 1.95
|
| 65 |
-
tir_Ethi 478 0.17
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
eng_Latn 6964 100.0
|
|
|
|
| 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
|
|
|
|
| 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
|
|
|
|
| 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>
|
|
|