Datasets:
cjvt
/

parquet-converter commited on
Commit
f320ce4
1 Parent(s): 97139a9

Update parquet files

Browse files
Files changed (4) hide show
  1. .gitattributes +0 -51
  2. README.md +0 -82
  3. default/rsdo4_en_sl-train.parquet +3 -0
  4. rsdo4_en_sl.py +0 -85
.gitattributes DELETED
@@ -1,51 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ftz filter=lfs diff=lfs merge=lfs -text
6
- *.gz filter=lfs diff=lfs merge=lfs -text
7
- *.h5 filter=lfs diff=lfs merge=lfs -text
8
- *.joblib filter=lfs diff=lfs merge=lfs -text
9
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
10
- *.lz4 filter=lfs diff=lfs merge=lfs -text
11
- *.model filter=lfs diff=lfs merge=lfs -text
12
- *.msgpack filter=lfs diff=lfs merge=lfs -text
13
- *.npy filter=lfs diff=lfs merge=lfs -text
14
- *.npz filter=lfs diff=lfs merge=lfs -text
15
- *.onnx filter=lfs diff=lfs merge=lfs -text
16
- *.ot filter=lfs diff=lfs merge=lfs -text
17
- *.parquet filter=lfs diff=lfs merge=lfs -text
18
- *.pb filter=lfs diff=lfs merge=lfs -text
19
- *.pickle filter=lfs diff=lfs merge=lfs -text
20
- *.pkl filter=lfs diff=lfs merge=lfs -text
21
- *.pt filter=lfs diff=lfs merge=lfs -text
22
- *.pth filter=lfs diff=lfs merge=lfs -text
23
- *.rar filter=lfs diff=lfs merge=lfs -text
24
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
25
- *.tar.* filter=lfs diff=lfs merge=lfs -text
26
- *.tflite filter=lfs diff=lfs merge=lfs -text
27
- *.tgz filter=lfs diff=lfs merge=lfs -text
28
- *.wasm filter=lfs diff=lfs merge=lfs -text
29
- *.xz filter=lfs diff=lfs merge=lfs -text
30
- *.zip filter=lfs diff=lfs merge=lfs -text
31
- *.zst filter=lfs diff=lfs merge=lfs -text
32
- *tfevents* filter=lfs diff=lfs merge=lfs -text
33
- # Audio files - uncompressed
34
- *.pcm filter=lfs diff=lfs merge=lfs -text
35
- *.sam filter=lfs diff=lfs merge=lfs -text
36
- *.raw filter=lfs diff=lfs merge=lfs -text
37
- # Audio files - compressed
38
- *.aac filter=lfs diff=lfs merge=lfs -text
39
- *.flac filter=lfs diff=lfs merge=lfs -text
40
- *.mp3 filter=lfs diff=lfs merge=lfs -text
41
- *.ogg filter=lfs diff=lfs merge=lfs -text
42
- *.wav filter=lfs diff=lfs merge=lfs -text
43
- # Image files - uncompressed
44
- *.bmp filter=lfs diff=lfs merge=lfs -text
45
- *.gif filter=lfs diff=lfs merge=lfs -text
46
- *.png filter=lfs diff=lfs merge=lfs -text
47
- *.tiff filter=lfs diff=lfs merge=lfs -text
48
- # Image files - compressed
49
- *.jpg filter=lfs diff=lfs merge=lfs -text
50
- *.jpeg filter=lfs diff=lfs merge=lfs -text
51
- *.webp filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md DELETED
@@ -1,82 +0,0 @@
1
- ---
2
- annotations_creators:
3
- - expert-generated
4
- - found
5
- language:
6
- - en
7
- - sl
8
- language_creators:
9
- - crowdsourced
10
- license:
11
- - cc-by-sa-4.0
12
- multilinguality:
13
- - translation
14
- pretty_name: RSDO4 en-sl parallel corpus
15
- size_categories:
16
- - 100K<n<1M
17
- source_datasets: []
18
- tags:
19
- - parallel data
20
- - rsdo
21
- task_categories:
22
- - translation
23
- - text2text-generation
24
- - text-generation
25
- task_ids: []
26
- ---
27
-
28
- # Dataset Card for RSDO4 en-sl parallel corpus
29
-
30
- ### Dataset Summary
31
-
32
- The RSDO4 parallel corpus of English-Slovene and Slovene-English translation pairs was collected as part of work package 4 of the Slovene in the Digital Environment project. It contains texts collected from public institutions and texts submitted by individual donors through the text collection portal created within the project. The corpus consists of 964433 translation pairs (extracted from standard translation formats (TMX, XLIFF) or manually aligned) in randomized order which can be used for machine translation training.
33
-
34
- ### Supported Tasks and Leaderboards
35
-
36
- Machine translation.
37
-
38
- ### Languages
39
-
40
- English, Slovenian.
41
-
42
- ## Dataset Structure
43
-
44
- ### Data Instances
45
-
46
- A sample instance from the dataset:
47
- ```
48
- {
49
- 'en_seq': 'the total value of its assets exceeds EUR 30000000000;',
50
- 'sl_seq': 'skupna vrednost njenih sredstev presega 30000000000 EUR'
51
- }
52
- ```
53
-
54
- ### Data Fields
55
-
56
- - `en_seq`: a string containing the English sequence;
57
- - `sl_seq`: a string containing the Slovene sequence.
58
-
59
- ## Additional Information
60
-
61
- ### Dataset Curators
62
-
63
- Andraž Repar and Iztok Lebar Bajec.
64
-
65
- ### Licensing Information
66
-
67
- CC BY-SA 4.0.
68
-
69
- ### Citation Information
70
-
71
- ```
72
- @misc{rsdo4_en_sl,
73
- title = {Parallel corpus {EN}-{SL} {RSDO4} 1.0},
74
- author = {Repar, Andra{\v z} and Lebar Bajec, Iztok},
75
- url = {http://hdl.handle.net/11356/1457},
76
- year = {2021}
77
- }
78
- ```
79
-
80
- ### Contributions
81
-
82
- Thanks to [@matejklemen](https://github.com/matejklemen) for adding this dataset.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
default/rsdo4_en_sl-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3dd4b8f74292d1859c05c30ab44e4f73739281182dc1b716912033dadb3c7a2d
3
+ size 83645070
rsdo4_en_sl.py DELETED
@@ -1,85 +0,0 @@
1
- """ rsdo4_en_sl is a parallel corpus of English-Slovene and Slovene-English translation pairs."""
2
- import xml.etree.ElementTree as ET
3
- import os
4
-
5
- import datasets
6
-
7
-
8
- _CITATION = """\
9
- @misc{rsdo4_en_sl,
10
- title = {Parallel corpus {EN}-{SL} {RSDO4} 1.0},
11
- author = {Repar, Andra{\v z} and Lebar Bajec, Iztok},
12
- url = {http://hdl.handle.net/11356/1457},
13
- year = {2021}
14
- }
15
- """
16
-
17
- _DESCRIPTION = """\
18
- The RSDO4 parallel corpus of English-Slovene and Slovene-English translation pairs was collected as part of work
19
- package 4 of the Slovene in the Digital Environment project. It contains texts collected from public institutions
20
- and texts submitted by individual donors through the text collection portal created within the project. The corpus
21
- consists of 964433 translation pairs (extracted from standard translation formats (TMX, XLIFF) or manually aligned)
22
- in randomized order which can be used for machine translation training.
23
- """
24
-
25
- _HOMEPAGE = "http://hdl.handle.net/11356/1457"
26
-
27
- _LICENSE = "Creative Commons - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)"
28
-
29
- _URLS = {
30
- "rsdo4_en_sl": "https://www.clarin.si/repository/xmlui/bitstream/handle/11356/1457/rsdo4-parallel-corpus-1-0.tmx.zip"
31
- }
32
-
33
- XML_NAMESPACE = "{http://www.w3.org/XML/1998/namespace}"
34
-
35
-
36
- class RSDO4EnSl(datasets.GeneratorBasedBuilder):
37
- """rsdo4_en_sl is a parallel corpus of English-Slovene and Slovene-English translation pairs."""
38
-
39
- VERSION = datasets.Version("1.0.0")
40
-
41
- def _info(self):
42
- features = datasets.Features(
43
- {
44
- "en_seq": datasets.Value("string"),
45
- "sl_seq": datasets.Value("string"),
46
- }
47
- )
48
- return datasets.DatasetInfo(
49
- description=_DESCRIPTION,
50
- features=features,
51
- homepage=_HOMEPAGE,
52
- license=_LICENSE,
53
- citation=_CITATION,
54
- )
55
-
56
- def _split_generators(self, dl_manager):
57
- urls = _URLS["rsdo4_en_sl"]
58
- data_dir = dl_manager.download_and_extract(urls)
59
- return [
60
- datasets.SplitGenerator(
61
- name=datasets.Split.TRAIN,
62
- # These kwargs will be passed to _generate_examples
63
- gen_kwargs={
64
- "file_path": os.path.join(data_dir, "rsdo4-parallel-corpus-1-0.tmx")
65
- }
66
- )
67
- ]
68
-
69
- def _generate_examples(self, file_path):
70
- doc = ET.parse(file_path)
71
- root = doc.getroot()
72
-
73
- for i, curr_unit in enumerate(root.iterfind(".//tu")):
74
- translation_pair = curr_unit.findall("tuv")
75
-
76
- formatted_pair = {}
77
- for curr_seq in translation_pair:
78
- # Not sure whether the languages are erroneously swapped or whether xml:lang represents the "language direction"
79
- seq_lang = "sl" if curr_seq.attrib[f"{XML_NAMESPACE}lang"] == "en" else "en"
80
-
81
- curr_text = curr_seq.find("seg").text
82
- curr_text = "" if curr_text is None else curr_text.strip()
83
- formatted_pair[f"{seq_lang}_seq"] = curr_text
84
-
85
- yield i, formatted_pair