|
import os |
|
from huggingface_hub import hf_hub_download |
|
|
|
|
|
langs = { |
|
'train': ['ar', 'bn', 'en', 'es', 'fa', 'fi', 'fr', 'hi', 'id', 'ja', 'ko', 'ru', 'sw', 'te', 'th', 'zh'], |
|
'dev': ['ar', 'bn', 'en', 'es', 'fa', 'fi', 'fr', 'hi', 'id', 'ja', 'ko', 'ru', 'sw', 'te', 'th', 'zh'], |
|
'testA': ['ar', 'bn', 'en', 'fi', 'id', 'ja', 'ko', 'ru', 'sw', 'te', 'th'] |
|
} |
|
|
|
|
|
langs = {'train': ['en', 'fa', 'ru', 'zh'], 'dev': ['en', 'fa', 'ru', 'zh']} |
|
|
|
for split in ['train', 'dev']: |
|
for lang in langs[split]: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hf_hub_download('miracl/miracl-corpus', |
|
filename=f'topics.miracl-v1.0-{lang}-{split}.tsv', |
|
subfolder=f'miracl-v1.0-{lang}/topics', |
|
repo_type='dataset', |
|
cache_dir='/home/dju/datasets/essir-xlir/miracl/topics', |
|
force_filename=f'topics.miracl-v1.0-{lang}-{split}.tsv' |
|
) |
|
|
|
cmd = f'rm -rvf /home/dju/datasets/essir-xlir/miracl/*/*lock' |
|
os.system(cmd) |
|
|
|
languages2filesize = { 'en': 66 , 'fa': 5, 'ru': 20, 'zh': 10, } |
|
|