You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 returnsLanguage::ChineseMandarin => return None,
for callers. Swapping toLanguage::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:I believe the ISO check here should support ChineseMandarin and map to "zh" in the call to fetch the ISO code.
The text was updated successfully, but these errors were encountered: