Datasets:
Update README.md
Browse filesMentioning Gronings in the readme to stimulate digital support. It has been an official regional language of the Netherlands since the nineties - 30 years ago! High time to give it some digital support.
I hope that it will eventually be added to Google Translate.
README.md
CHANGED
@@ -1,3 +1,58 @@
|
|
1 |
-
---
|
2 |
-
license: cc-by-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-2.0
|
3 |
+
language:
|
4 |
+
- nl
|
5 |
+
- en
|
6 |
+
- de
|
7 |
+
- es
|
8 |
+
- gos
|
9 |
+
task_categories:
|
10 |
+
- translation
|
11 |
+
tags:
|
12 |
+
- linguistics
|
13 |
+
- language
|
14 |
+
- machine_translation
|
15 |
+
- machine-translation
|
16 |
+
- translation
|
17 |
+
- tatoeba
|
18 |
+
pretty_name: Upload of 21 December 2024 version of Tatoeba dataset.
|
19 |
+
size_categories:
|
20 |
+
- 10M<n<100M
|
21 |
+
---
|
22 |
+
|
23 |
+
I would recommend anyone to download the most recent version of the files [directly from Tatoeba](https://tatoeba.org/downloads).
|
24 |
+
Since the most recent version of the dataset on huggingface is already quite old, I uploaded today's versions of the Tatoeba sentences. I uploaded the full dataset, as well as some files for some individual languages that I happen to speak. Honorable mention to Gronings, language code gos.
|
25 |
+
|
26 |
+
Example code to download the most recent version of the Tatoeba dataset:
|
27 |
+
```
|
28 |
+
import requests
|
29 |
+
|
30 |
+
with open("downloadlinks.txt") as file:
|
31 |
+
for link in file:
|
32 |
+
link = link.strip()
|
33 |
+
if link:
|
34 |
+
response = requests.get(link)
|
35 |
+
open(link.split("/")[-1], "wb").write(response.content)
|
36 |
+
```
|
37 |
+
Where `downloadlinks.txt` could contain something like:
|
38 |
+
```
|
39 |
+
https://downloads.tatoeba.org/exports/links.tar.bz2
|
40 |
+
https://downloads.tatoeba.org/exports/per_language/eng/eng_sentences.tsv.bz2
|
41 |
+
https://downloads.tatoeba.org/exports/per_language/gos/gos_sentences.tsv.bz2
|
42 |
+
https://downloads.tatoeba.org/exports/per_language/nld/nld_sentences.tsv.bz2
|
43 |
+
https://downloads.tatoeba.org/exports/sentences_detailed.tar.bz2
|
44 |
+
https://downloads.tatoeba.org/exports/sentences.tar.bz2
|
45 |
+
```
|
46 |
+
Here's some more code to help you get started, linking the sentences. Assuming you've downloaded the files:
|
47 |
+
```
|
48 |
+
import pandas as pd
|
49 |
+
lang1 = "eng"
|
50 |
+
lang2 = "gos"
|
51 |
+
|
52 |
+
lang1_sentences = pd.read_csv(f"{lang1}_sentences.tsv.bz2", sep="\t", header=None, names=["id", "language", lang1])
|
53 |
+
lang2_sentences = pd.read_csv(f"{lang2}_sentences.tsv.bz2", sep="\t", header=None, names=["id", "language", lang2])
|
54 |
+
link_sentences = pd.read_csv("links.tar.bz2", sep="\t", header=None, names=["origin", "translation"])
|
55 |
+
|
56 |
+
df_parallel = link_sentences.merge(lang1_sentences, left_on="origin", right_on="id").merge(lang2_sentences, left_on="translation", right_on="id")[["origin", "translation", lang1, lang2]]
|
57 |
+
print(df_parallel)
|
58 |
+
```
|