Datasets:

ArXiv:
Guillaume Wenzek commited on
Commit
24a8ba0
1 Parent(s): 5de2d46

use CC-Matrix citation for CCMatrix data

Browse files
Files changed (1) hide show
  1. nllb.py +15 -4
nllb.py CHANGED
@@ -23,7 +23,7 @@ version from statmt.org, or the new one from AllenAI.
23
  import datasets
24
  import typing as tp
25
 
26
- _CITATION = (
27
  "@article{team2022NoLL,"
28
  "title={No Language Left Behind: Scaling Human-Centered Machine Translation},"
29
  r"author={Nllb team and Marta Ruiz Costa-juss{\`a} and James Cross and Onur Celebi and Maha Elbayad and Kenneth Heafield and Kevin Heffernan and Elahe Kalbassi and Janice Lam and Daniel Licht and Jean Maillard and Anna Sun and Skyler Wang and Guillaume Wenzek and Alison Youngblood and Bapi Akula and Lo{\"i}c Barrault and Gabriel Mejia Gonzalez and Prangthip Hansanti and John Hoffman and Semarley Jarrett and Kaushik Ram Sadagopan and Dirk Rowe and Shannon L. Spruit and C. Tran and Pierre Andrews and Necip Fazil Ayan and Shruti Bhosale and Sergey Edunov and Angela Fan and Cynthia Gao and Vedanuj Goswami and Francisco Guzm'an and Philipp Koehn and Alexandre Mourachko and Christophe Ropers and Safiyyah Saleem and Holger Schwenk and Jeff Wang},"
@@ -33,6 +33,15 @@ _CITATION = (
33
  "}"
34
  )
35
 
 
 
 
 
 
 
 
 
 
36
 
37
  _DESCRIPTION = "" # TODO
38
 
@@ -77,7 +86,7 @@ def _builder_configs() -> tp.List[NLLBTaskConfig]:
77
  src_lg=src_lg,
78
  tgt_lg=tgt_lg,
79
  # Use CCMatrix language code to fetch from statmt
80
- url = f"{_STATMT_URL}{src}-{tgt}.bitextf.tsv.gz"
81
  )
82
 
83
  for (src_lg, tgt_lg) in _LANGUAGE_PAIRS:
@@ -87,7 +96,7 @@ def _builder_configs() -> tp.List[NLLBTaskConfig]:
87
  description=f"No Language Left Behind (NLLB): {src_lg} - {tgt_lg}",
88
  src_lg=src_lg,
89
  tgt_lg=tgt_lg,
90
- url = f"{_ALLENAI_URL}{src_lg}-{tgt_lg}.gz"
91
  )
92
  return list(configs.values())
93
 
@@ -100,6 +109,7 @@ class NLLB(datasets.GeneratorBasedBuilder):
100
 
101
  def _info(self):
102
  # define feature types
 
103
  features = datasets.Features(
104
  {
105
  "translation": datasets.Translation(
@@ -115,6 +125,7 @@ class NLLB(datasets.GeneratorBasedBuilder):
115
  }
116
  )
117
  if self.config.source == "statmt":
 
118
  # MT stats didn't published all the metadata
119
  features = datasets.Features(
120
  {
@@ -131,7 +142,7 @@ class NLLB(datasets.GeneratorBasedBuilder):
131
  supervised_keys=None,
132
  homepage=_HOMEPAGE,
133
  license=_LICENSE,
134
- citation=_CITATION,
135
  )
136
 
137
  def _split_generators(self, dl_manager):
 
23
  import datasets
24
  import typing as tp
25
 
26
+ NLLB_CITATION = (
27
  "@article{team2022NoLL,"
28
  "title={No Language Left Behind: Scaling Human-Centered Machine Translation},"
29
  r"author={Nllb team and Marta Ruiz Costa-juss{\`a} and James Cross and Onur Celebi and Maha Elbayad and Kenneth Heafield and Kevin Heffernan and Elahe Kalbassi and Janice Lam and Daniel Licht and Jean Maillard and Anna Sun and Skyler Wang and Guillaume Wenzek and Alison Youngblood and Bapi Akula and Lo{\"i}c Barrault and Gabriel Mejia Gonzalez and Prangthip Hansanti and John Hoffman and Semarley Jarrett and Kaushik Ram Sadagopan and Dirk Rowe and Shannon L. Spruit and C. Tran and Pierre Andrews and Necip Fazil Ayan and Shruti Bhosale and Sergey Edunov and Angela Fan and Cynthia Gao and Vedanuj Goswami and Francisco Guzm'an and Philipp Koehn and Alexandre Mourachko and Christophe Ropers and Safiyyah Saleem and Holger Schwenk and Jeff Wang},"
 
33
  "}"
34
  )
35
 
36
+ CCMATRIX_CITATION = (
37
+ "@inproceedings{schwenk2021ccmatrix,"
38
+ "title={CCMatrix: Mining Billions of High-Quality Parallel Sentences on the Web},"
39
+ "author={Schwenk, Holger and Wenzek, Guillaume and Edunov, Sergey and Grave, {'E}douard and Joulin, Armand and Fan, Angela},"
40
+ "booktitle={Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)},"
41
+ "pages={6490--6500},"
42
+ "year={2021}"
43
+ )
44
+
45
 
46
  _DESCRIPTION = "" # TODO
47
 
 
86
  src_lg=src_lg,
87
  tgt_lg=tgt_lg,
88
  # Use CCMatrix language code to fetch from statmt
89
+ url=f"{_STATMT_URL}{src}-{tgt}.bitextf.tsv.gz",
90
  )
91
 
92
  for (src_lg, tgt_lg) in _LANGUAGE_PAIRS:
 
96
  description=f"No Language Left Behind (NLLB): {src_lg} - {tgt_lg}",
97
  src_lg=src_lg,
98
  tgt_lg=tgt_lg,
99
+ url=f"{_ALLENAI_URL}{src_lg}-{tgt_lg}.gz",
100
  )
101
  return list(configs.values())
102
 
 
109
 
110
  def _info(self):
111
  # define feature types
112
+ citation = NLLB_CITATION
113
  features = datasets.Features(
114
  {
115
  "translation": datasets.Translation(
 
125
  }
126
  )
127
  if self.config.source == "statmt":
128
+ citation = CCMATRIX_CITATION
129
  # MT stats didn't published all the metadata
130
  features = datasets.Features(
131
  {
 
142
  supervised_keys=None,
143
  homepage=_HOMEPAGE,
144
  license=_LICENSE,
145
+ citation=citation,
146
  )
147
 
148
  def _split_generators(self, dl_manager):