Choose the augmentation to perform based on script information #1172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a bit bigger work compared to some of the other PRs. The first commit is a bit off topic, but includes some fixes that were hard to rebase around, so I left them in there with this commit.
This work generalizes the CJK and Arabic script changes to use script information rather than specific language checks for what type of augmentations can be run.
The file
pipeline/data/lang_script.py
was built with a combination of CLDR information and Wikipedia sleuthing to build up a big list of potential scripts. It's a bit overkill as we'll most likely never use a lot of the scripts, but I just got a list from CLDR and worked through it.The opustrainer configs are now built dynamically based on the script features.