Skip to content

Commit

Permalink
Filter supported languages (SEA only) of seacrowd_qa schema for MKQA S…
Browse files Browse the repository at this point in the history
  • Loading branch information
fhudi committed Jan 31, 2024
1 parent 76ca2e8 commit 9ed7b79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion seacrowd/sea_datasets/mkqa/mkqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _generate_examples(self, filepath: Path) -> Tuple[int, Dict]:

elif self.config.schema == "seacrowd_qa":
for cur in datas:
for cur_lang in [lang] if lang else self._SOURCE_LANGUAGES:
for cur_lang in [lang] if lang else map(lambda k: self._LANG_3TO2.get(k, k), _LANGUAGES):
ret = {
"id": f'{cur["example_id"]}_{cur_lang}',
"question_id": cur["example_id"],
Expand Down

0 comments on commit 9ed7b79

Please sign in to comment.