How do you specify source and target language?

#2
by narai - opened

How do you specify source and target language?

It looks like "<2pt> " as an example goes at the start of the string, probably means "translate to portugese", but it didn't work properly. Got a very short english output.

You are correct. The first token ("<2pt>" ) specifies the target language. You can't specify the source language.

To specify in which language you want to translate your text, you must specify it in the "<2langcode>" field.

Here is a list of possible languages:
ace ace ace_Arab af am an an ar ary arz as az ba ban bar be bg bho bjn bjn_Arab bm bn br bs bug ca ceb crh_Latn cs cy da de din dv dz el en en_xx_simple eo es et eu fa fi fil fo fr fr_CA fr_CA fr_ca fur fuv fy ga gd gl gn gu gu ha he hi hne hr hu hy id ig io is it iu ja jv ka kk km kn ko kr kr kr_Arab ks ks_Deva ku ky la lb li lij lmo lt ltg lv mag mg mi mk ml mn mni mr ms mt mwl my nb nds nds_NLL nds_nl ne nl nn no nus oc or pa pa pl prs ps pt pt_br ro ru rw sc scn sd se se sh shn si simple sk sl so sq sr sv sw szl ta taq taq_Tfng te tg th tk tl tr tt tzm ug uk ur uz vec vi wa wuu xh yi yo yo zh zh zh_Hant zh_cn zh_tw zu

Information taken from here:
https://github.com/google-research/google-research/blob/master/madlad_400/inference_example.ipynb

Sign up or log in to comment