“ Google: /sampledmultilingualdata/google/en-x/en2arfloresgoogle.txt…
- User
“ Google: /sampled_multilingual_data/google/en-x/en2ar_flores_google.txt /sampled_multilingual_data/google/x-en/ar2en_flores_google.txt DeepL: /sampled_multilingual_data/deepl/en2tr.deepl /sampled_multilingual_data/deepl/en2ar.deepl
GPT-4: /sampled_multilingual_data/gpt4/en2xx/flores_mt_en_to_ar.json /sampled_multilingual_data/gpt4/xx2en/aren_gpt4.txt
Marco-7B: /checkpoint-895/flores_mt_ar_to_en_tgt_new.txt /checkpoint-895/flores_mt_en_to_ar_tgt_new.txt “
Above are the dirs to the output from each model (Google, DeepL, etc.), I want you to gather and organise outputs for these models, below are some information and requirements :
- The two dirs (different translation directions) are example files, there are many files under their super dir like other languages - en2en_flores_google.txt (English to German), so you need to gather all files under the dir of each model with similar names (en2xx.deepl, xx2en.deepl, etc.) you only need to alter the language direction part.
- The “.txt” and “.deepl” file are line by line from each model, the “.json” file should work with getting “entry["target”]” and “entry["filtered_resps”][0]” where entry is one example in list of json in each json file
- You need to remove the first line in lines of “.deepl” file.
- Organise them in json format, json[model_name][‘outputs’]
- Implement the code in python
- Assistant