Datasets:
metadata
license: pddl
task_categories:
- translation
language:
- be
- en
size_categories:
- n<1K
Overview
This is a small dataset of English-Belarusian sentence pairs sampled from the largest parallel corpora in OPUS (100 random instances from each of the following: NLLB, HPLT, CCMatrix, CCAligned) and manually labeled for correctness by a speaker of Belarusian. The taxonomy of labels follows Kreutzer et al. 2022:
- CC: correct translation, natural sentence
- CB: correct translation, boilerplate or low quality
- CS: correct translation, short
- X: incorrect translation
- WL: wrong language
- NL: not a language
Where appropriate, the labels are accompanied by free-form comments.
Data sampling
In Unix shell, execute:
sample_sentence_pairs () {
mkdir -p $1
cd $1
wget https://object.pouta.csc.fi/OPUS-$1/$2/moses/be-en.txt.zip
unzip be-en.txt.zip
paste $1.be-en.en $1.be-en.be | shuf -n 100 > $1.be-en.sample100.txt
ls | grep -v sample100 | xargs rm
cd ..
}
sample_sentence_pairs NLLB v1
sample_sentence_pairs HPLT v2
sample_sentence_pairs CCMatrix v1
sample_sentence_pairs CCAligned v1
mv */*.txt .
rm -r NLLB HPLT CCMatrix CCAligned
Then in Python:
import csv
def to_csv(filename):
with open(filename) as f:
data = [line.strip().split("\t") for line in f]
assert all(len(x) == 2 for x in data)
with open("processed_%s.csv" % filename, "w") as f:
csv_writer = csv.writer(f)
csv_writer.writerow(["en", "be"])
csv_writer.writerows(data)
to_csv("NLLB.be-en.sample100.txt")
to_csv("HPLT.be-en.sample100.txt")
to_csv("CCMatrix.be-en.sample100.txt")
to_csv("CCAligned.be-en.sample100.txt")
Labeling results
Dataset | CC | CB | CS | X | WL | NL |
---|---|---|---|---|---|---|
NLLB | 17 | 73 | 10 | |||
HPLT | 41 | 35 | 6 | 17 | 1 | |
CCMatrix | 7 | 1 | 92 | |||
CCAligned | 31 | 38 | 8 | 22 | 1 |