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

M2M100 - English to ChineseMandarin ONNX Model #463

Open
chriskyndrid opened this issue Aug 4, 2024 · 0 comments
Open

M2M100 - English to ChineseMandarin ONNX Model #463

chriskyndrid opened this issue Aug 4, 2024 · 0 comments

Comments

@chriskyndrid
Copy link

I'm attempting to translate from English to ChineseMandarin. The target languages in the rust_bert crate indicate ChineseMandarin is a supported language. Additionally the documentation on hugging fast also indicates it's a supported language and even provides an example of the translation. However, the get_iso_639_1_code routine explcitly returns Language::ChineseMandarin => return None, for callers. Swapping to Language::Chinese which maps to 'zh', which I believe is the accurate code, returns an error that the language isn't valid. Thus, the ChineseMandarin language passes the validity check, but doesn't end up with an ISO code, so translation fails at:

         let language_code = target_language.get_iso_639_1_code().ok_or_else(|| {
                            RustBertError::ValueError(format!(
                                "This language has no ISO639-I language code representation. \
                            languages supported by the model: {supported_target_languages:?}"
                            ))
                        })?;
                        

I believe the ISO check here should support ChineseMandarin and map to "zh" in the call to fetch the ISO code.

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

No branches or pull requests

1 participant