Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
text
Sub-tasks:
language-modeling
Size:
< 1K
License:
parquet-converter
commited on
Commit
·
75d57c4
1
Parent(s):
612ada7
Update parquet files
Browse files
README.md
DELETED
@@ -1,148 +0,0 @@
|
|
1 |
-
---
|
2 |
-
annotations_creators:
|
3 |
-
- no-annotation
|
4 |
-
language_creators:
|
5 |
-
- found
|
6 |
-
language:
|
7 |
-
- ca
|
8 |
-
- en
|
9 |
-
license:
|
10 |
-
- gpl-3.0
|
11 |
-
multilinguality:
|
12 |
-
- monolingual
|
13 |
-
size_categories:
|
14 |
-
- 1M<n<10M
|
15 |
-
source_datasets:
|
16 |
-
- original
|
17 |
-
task_categories:
|
18 |
-
- text-generation
|
19 |
-
task_ids:
|
20 |
-
- language-modeling
|
21 |
-
pretty_name: open-source-english-catalan-corpus
|
22 |
-
---
|
23 |
-
|
24 |
-
# Dataset Card for open-source-english-catalan-corpus
|
25 |
-
|
26 |
-
## Table of Contents
|
27 |
-
- [Table of Contents](#table-of-contents)
|
28 |
-
- [Dataset Description](#dataset-description)
|
29 |
-
- [Dataset Summary](#dataset-summary)
|
30 |
-
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
31 |
-
- [Languages](#languages)
|
32 |
-
- [Dataset Structure](#dataset-structure)
|
33 |
-
- [Data Instances](#data-instances)
|
34 |
-
- [Data Fields](#data-fields)
|
35 |
-
- [Data Splits](#data-splits)
|
36 |
-
- [Dataset Creation](#dataset-creation)
|
37 |
-
- [Curation Rationale](#curation-rationale)
|
38 |
-
- [Source Data](#source-data)
|
39 |
-
- [Annotations](#annotations)
|
40 |
-
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
41 |
-
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
42 |
-
- [Social Impact of Dataset](#social-impact-of-dataset)
|
43 |
-
- [Discussion of Biases](#discussion-of-biases)
|
44 |
-
- [Other Known Limitations](#other-known-limitations)
|
45 |
-
- [Additional Information](#additional-information)
|
46 |
-
- [Dataset Curators](#dataset-curators)
|
47 |
-
- [Licensing Information](#licensing-information)
|
48 |
-
- [Citation Information](#citation-information)
|
49 |
-
- [Contributions](#contributions)
|
50 |
-
|
51 |
-
## Dataset Description
|
52 |
-
|
53 |
-
- **Homepage:**
|
54 |
-
- **Repository:** https://www.softcatala.org/recursos/memories/
|
55 |
-
- **Paper:**
|
56 |
-
- **Leaderboard:**
|
57 |
-
- **Point of Contact:**
|
58 |
-
|
59 |
-
### Dataset Summary
|
60 |
-
|
61 |
-
Translation memory built from more than 180 open source projects. These include LibreOffice, Mozilla, KDE, GNOME, GIMP, Inkscape and many others. It can be used as translation memory or as training corpus for neural translators.
|
62 |
-
|
63 |
-
|
64 |
-
### Supported Tasks and Leaderboards
|
65 |
-
|
66 |
-
[More Information Needed]
|
67 |
-
|
68 |
-
### Languages
|
69 |
-
|
70 |
-
Catalan (`ca`)
|
71 |
-
English (`en`)
|
72 |
-
|
73 |
-
## Dataset Structure
|
74 |
-
|
75 |
-
|
76 |
-
### Data Instances
|
77 |
-
|
78 |
-
[More Information Needed]
|
79 |
-
|
80 |
-
### Data Fields
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Data Splits
|
85 |
-
|
86 |
-
[More Information Needed]
|
87 |
-
|
88 |
-
## Dataset Creation
|
89 |
-
|
90 |
-
### Curation Rationale
|
91 |
-
|
92 |
-
[More Information Needed]
|
93 |
-
|
94 |
-
### Source Data
|
95 |
-
|
96 |
-
#### Initial Data Collection and Normalization
|
97 |
-
|
98 |
-
[More Information Needed]
|
99 |
-
|
100 |
-
#### Who are the source language producers?
|
101 |
-
|
102 |
-
[More Information Needed]
|
103 |
-
|
104 |
-
### Annotations
|
105 |
-
|
106 |
-
#### Annotation process
|
107 |
-
|
108 |
-
[More Information Needed]
|
109 |
-
|
110 |
-
#### Who are the annotators?
|
111 |
-
|
112 |
-
[More Information Needed]
|
113 |
-
|
114 |
-
### Personal and Sensitive Information
|
115 |
-
|
116 |
-
[More Information Needed]
|
117 |
-
|
118 |
-
## Considerations for Using the Data
|
119 |
-
|
120 |
-
### Social Impact of Dataset
|
121 |
-
|
122 |
-
[More Information Needed]
|
123 |
-
|
124 |
-
### Discussion of Biases
|
125 |
-
|
126 |
-
[More Information Needed]
|
127 |
-
|
128 |
-
### Other Known Limitations
|
129 |
-
|
130 |
-
[More Information Needed]
|
131 |
-
|
132 |
-
## Additional Information
|
133 |
-
|
134 |
-
### Dataset Curators
|
135 |
-
|
136 |
-
[More Information Needed]
|
137 |
-
|
138 |
-
### Licensing Information
|
139 |
-
|
140 |
-
[GPL 3.0](https://www.gnu.org/licenses/gpl-3.0.html).
|
141 |
-
|
142 |
-
### Citation Information
|
143 |
-
|
144 |
-
[More Information Needed]
|
145 |
-
|
146 |
-
### Contributions
|
147 |
-
|
148 |
-
Softcatalà
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
raw/convert.sh
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
FILE=tots-tm.po.zip
|
2 |
-
rm -r $FILE
|
3 |
-
wget https://static.softcatala.org/memories/$FILE
|
4 |
-
unzip -o $FILE tots-tm.po
|
5 |
-
|
6 |
-
python3 po-to-tsv.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
raw/po-to-tsv.py
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
# (c) 2022 Jordi Mas i Hernàndez. Licensed under GPL 3.0.
|
2 |
-
import polib
|
3 |
-
import re
|
4 |
-
|
5 |
-
def _remove_accelerators(result):
|
6 |
-
CHARS = (
|
7 |
-
'_', '&', '~' # Accelerators.
|
8 |
-
)
|
9 |
-
for c in CHARS:
|
10 |
-
result = result.replace(c, '')
|
11 |
-
|
12 |
-
return result.strip()
|
13 |
-
|
14 |
-
def _remove_tags(text):
|
15 |
-
clean = re.sub("<[^>]*>", "", text)
|
16 |
-
return clean
|
17 |
-
|
18 |
-
def _is_non_localized_string(src, trg):
|
19 |
-
words_src_len = len(src.split())
|
20 |
-
words_trg_len = len(trg.split())
|
21 |
-
if words_src_len > 2 and words_trg_len > 2:
|
22 |
-
return src == trg
|
23 |
-
|
24 |
-
return False
|
25 |
-
|
26 |
-
def _is_invalid(src, trg):
|
27 |
-
if len(src) < 2 or len(trg) < 2:
|
28 |
-
return True
|
29 |
-
|
30 |
-
if '\n' in src or '\n' in trg:
|
31 |
-
return True
|
32 |
-
|
33 |
-
if '@@image' in src or '@@image' in trg:
|
34 |
-
return True
|
35 |
-
|
36 |
-
if _is_non_localized_string(src, trg):
|
37 |
-
return True
|
38 |
-
|
39 |
-
return False
|
40 |
-
|
41 |
-
|
42 |
-
def generate_tsv(po_filename, output_filename):
|
43 |
-
|
44 |
-
SEPARATOR = '\t'
|
45 |
-
|
46 |
-
input_po = polib.pofile(po_filename)
|
47 |
-
entries = 0
|
48 |
-
words = 0
|
49 |
-
srcs = set()
|
50 |
-
|
51 |
-
with open(po_filename, "r") as source,\
|
52 |
-
open(output_filename, "w") as output:
|
53 |
-
|
54 |
-
for entry in input_po:
|
55 |
-
|
56 |
-
src = _remove_accelerators(entry.msgid.strip())
|
57 |
-
trg = _remove_accelerators(entry.msgstr.strip())
|
58 |
-
src = _remove_tags(src)
|
59 |
-
trg = _remove_tags(trg)
|
60 |
-
|
61 |
-
if _is_invalid(src, trg):
|
62 |
-
continue
|
63 |
-
|
64 |
-
if SEPARATOR in src or SEPARATOR in trg:
|
65 |
-
continue
|
66 |
-
|
67 |
-
if src in srcs:
|
68 |
-
continue
|
69 |
-
|
70 |
-
srcs.add(src)
|
71 |
-
output.write(f"{src}{SEPARATOR}{trg}\n")
|
72 |
-
words += len(src.split())
|
73 |
-
entries += 1
|
74 |
-
|
75 |
-
print(f"Generated {entries} entries with {words} words")
|
76 |
-
|
77 |
-
|
78 |
-
def main():
|
79 |
-
|
80 |
-
print("Generate TSV from a PO file")
|
81 |
-
generate_tsv("tots-tm.po", "MemoriesProjectesLliures.tsv")
|
82 |
-
|
83 |
-
if __name__ == "__main__":
|
84 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
raw/requirements.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
polib
|
|
|
|
MemoriesProjectesLliures.tsv → softcatala--open-source-english-catalan-corpus/train/0000.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a88ddd6cc628bef737ec505bb71e414b8b55592141b0c209da0cc999db7e70c6
|
3 |
+
size 751
|