Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download allenai nllb mined bitext #25

Open
wants to merge 3 commits into
base: nllb_replication
Choose a base branch
from

Conversation

vienneraphael
Copy link
Collaborator

Partially closes #11 (analysis needs to be added)
Allows downloading lang pairs from allenai nllb dataset (huggingface dataset): https://huggingface.co/datasets/allenai/nllb/tree/main

I've stored the NLLB_PAIRS (pairs released with NLLB paper) and CCMATRIX_PAIRS (pairs for which NLLB paper reused previous CCMatrix dataset) in a separate python file to import these variables into the main script because these two are rather big and could impair code readability.

Resulting tree structure with flag --minimal (debug mode) enabled:

downloads/nllb/
├── ace_Latn-ban_Latn
│ ├── allenai.nllb.ace_Latn
│ └── allenai.nllb.ban_Latn
└── amh_Ethi-nus_Latn
├── allenai.nllb.amh_Ethi
└── allenai.nllb.nus_Latn

I'm planning on doing analysis as the next steps to this PR.

Copy link
Owner

@gordicaleksa gordicaleksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

examples/nllb/data/download_mined_bitext.py Outdated Show resolved Hide resolved
examples/nllb/data/download_mined_bitext.py Outdated Show resolved Hide resolved
examples/nllb/data/download_mined_bitext.py Outdated Show resolved Hide resolved
examples/nllb/data/download_mined_bitext.py Outdated Show resolved Hide resolved
Copy link
Owner

@gordicaleksa gordicaleksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great!

Can you please test on a couple of directions?

I had issues with Serbian for example, I think I tried eng_Latn-srp_Cyrl or Latn.

@vienneraphael
Copy link
Collaborator Author

Looking great!

Can you please test on a couple of directions?

I had issues with Serbian for example, I think I tried eng_Latn-srp_Cyrl or Latn.

I myself tried with eng_Latn-srp_Cyrl and it worked (though i had to stop the program because that was really too much data). Still i can download it!

As for eng_Latn-srp_Latn, this lang pair doesn't appear in the error, nor in the NLLB_PAIRS, so I guess it isn't there in the dataset.

@vienneraphael
Copy link
Collaborator Author

I'm realizing there are some pairs for which the dataset viewer doesn't work on hugginface.
image

However, these pairs are not necessarily problematic, since i managed to download srp_Cyrl-tur_Latn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup a pipeline for mined data (use Allen AI's OSS dataset replication)
2 participants