Datasets:
Fix: wmt datasets - fix CWMT zh subsets (#4871)
Browse filesfix cwmt zh subsets
Commit from https://github.com/huggingface/datasets/commit/54b532a8a2f5353fdb0207578162153f7b2da2ec
- wmt_utils.py +1 -1
wmt_utils.py
CHANGED
@@ -875,7 +875,7 @@ def _parse_parallel_sentences(f1, f2, filename1, filename2):
|
|
875 |
if split_path[-1] == "txt":
|
876 |
# CWMT
|
877 |
lang = split_path[-2].split("_")[-1]
|
878 |
-
lang = "zh" if lang in ("ch", "cn") else lang
|
879 |
else:
|
880 |
lang = split_path[-1]
|
881 |
|
|
|
875 |
if split_path[-1] == "txt":
|
876 |
# CWMT
|
877 |
lang = split_path[-2].split("_")[-1]
|
878 |
+
lang = "zh" if lang in ("ch", "cn", "c[hn]") else lang
|
879 |
else:
|
880 |
lang = split_path[-1]
|
881 |
|