|
import datasets |
|
|
|
from .wmt_utils import Wmt, WmtConfig |
|
|
|
|
|
_URL = "http://www.statmt.org/wmt22/translation-task.html" |
|
|
|
_CITATION = """ |
|
@ONLINE {wmt22translate, |
|
author = {Wikimedia Foundation}, |
|
title = {EMNLP 2022 Seventh Conference on Machine Translation (WMT22), Shared Task: General Machine Translation}, |
|
url = {http://www.statmt.org/wmt22/translation-task.html} |
|
} |
|
""" |
|
|
|
|
|
_LANGUAGE_PAIRS = ( |
|
{(src, "en") for src in ["cs", "de", "ha", "ig", "is", "ja", "ps", "ru", "zh"]} |
|
| {("ca", "es"), ("de", "fr"), ("bn", "hi")} |
|
| {(src, "pt") for src in ["ca", "es"]} |
|
| {(src, "ro") for src in ["ca", "es", "pt"]} |
|
| {("xh", "zu")} |
|
) |
|
|
|
|
|
class Wikititles(Wmt): |
|
|
|
BUILDER_CONFIGS = [ |
|
WmtConfig( |
|
description="Wikititles v3 {0}-{1} translation dataset".format(*language_pair), |
|
url=_URL, |
|
citation=_CITATION, |
|
language_pair=language_pair, |
|
version=datasets.Version("3.0.0"), |
|
) |
|
for language_pair in _LANGUAGE_PAIRS |
|
] |
|
|
|
@property |
|
def _subsets(self): |
|
return {datasets.Split.TRAIN: ["wikititles_v3"]} |
|
|