Spaces:
Runtime error
Runtime error
Upload code_flores_latest.py
Browse files- code_flores_latest.py +222 -0
code_flores_latest.py
ADDED
@@ -0,0 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
codes_as_string_new = '''Acehnese (Arabic script) ace_Arab
|
2 |
+
Acehnese (Latin script) ace_Latn
|
3 |
+
Mesopotamian Arabic acm_Arab
|
4 |
+
Ta’izzi-Adeni Arabic acq_Arab
|
5 |
+
Tunisian Arabic aeb_Arab
|
6 |
+
Afrikaans afr_Latn
|
7 |
+
Albanian (Tosk) als_Latn
|
8 |
+
Amharic amh_Ethi
|
9 |
+
Levantine Arabic (North) apc_Arab
|
10 |
+
Levantine Arabic (South) apc_Arab
|
11 |
+
Modern Standard Arabic arb_Arab
|
12 |
+
Modern Standard Arabic (Romanized) arb_Latn
|
13 |
+
Najdi Arabic ars_Arab
|
14 |
+
Moroccan Arabic ary_Arab
|
15 |
+
Egyptian Arabic arz_Arab
|
16 |
+
Assamese asm_Beng
|
17 |
+
Asturian ast_Latn
|
18 |
+
Awadhi awa_Deva
|
19 |
+
Central Aymara ayr_Latn
|
20 |
+
South Azerbaijani azb_Arab
|
21 |
+
North Azerbaijani azj_Latn
|
22 |
+
Bashkir bak_Cyrl
|
23 |
+
Bambara bam_Latn
|
24 |
+
Balinese ban_Latn
|
25 |
+
Belarusian bel_Cyrl
|
26 |
+
Bemba bem_Latn
|
27 |
+
Bengali ben_Beng
|
28 |
+
Bhojpuri bho_Deva
|
29 |
+
Banjar (Jawi script) bjn_Arab
|
30 |
+
Banjar (Latin script) bjn_Latn
|
31 |
+
Lhasa Tibetan bod_Tibt
|
32 |
+
Bosnian bos_Latn
|
33 |
+
Bodo brx_Deva
|
34 |
+
Buginese bug_Latn
|
35 |
+
Bulgarian bul_Cyrl
|
36 |
+
Catalan cat_Latn
|
37 |
+
Cebuano ceb_Latn
|
38 |
+
Czech ces_Latn
|
39 |
+
Chuvash chv_Cyrl
|
40 |
+
Chokwe cjk_Latn
|
41 |
+
Central Kurdish ckb_Arab
|
42 |
+
Mandarin Chinese (Standard Beijing) cmn_Hans
|
43 |
+
Mandarin Chinese (Taiwanese) cmn_Hant
|
44 |
+
Crimean Tatar crh_Latn
|
45 |
+
Welsh cym_Latn
|
46 |
+
Danish dan_Latn
|
47 |
+
German deu_Latn
|
48 |
+
Dogri dgo_Deva
|
49 |
+
Southwestern Dinka dik_Latn
|
50 |
+
Dyula dyu_Latn
|
51 |
+
Dzongkha dzo_Tibt
|
52 |
+
Estonian ekk_Latn
|
53 |
+
Greek ell_Grek
|
54 |
+
English eng_Latn
|
55 |
+
Esperanto epo_Latn
|
56 |
+
Basque eus_Latn
|
57 |
+
Ewe ewe_Latn
|
58 |
+
Faroese fao_Latn
|
59 |
+
Fijian fij_Latn
|
60 |
+
Filipino fil_Latn
|
61 |
+
Finnish fin_Latn
|
62 |
+
Fon fon_Latn
|
63 |
+
French fra_Latn
|
64 |
+
Friulian fur_Latn
|
65 |
+
Nigerian Fulfulde fuv_Latn
|
66 |
+
West Central Oromo gaz_Latn
|
67 |
+
Scottish Gaelic gla_Latn
|
68 |
+
Irish gle_Latn
|
69 |
+
Galician glg_Latn
|
70 |
+
Goan Konkani gom_Deva
|
71 |
+
Paraguayan Guaraní gug_Latn
|
72 |
+
Gujarati guj_Gujr
|
73 |
+
Haitian Creole hat_Latn
|
74 |
+
Hausa hau_Latn
|
75 |
+
Hebrew heb_Hebr
|
76 |
+
Hindi hin_Deva
|
77 |
+
Chhattisgarhi hne_Deva
|
78 |
+
Croatian hrv_Latn
|
79 |
+
Hungarian hun_Latn
|
80 |
+
Armenian hye_Armn
|
81 |
+
Igbo ibo_Latn
|
82 |
+
Ilocano ilo_Latn
|
83 |
+
Indonesian ind_Latn
|
84 |
+
Icelandic isl_Latn
|
85 |
+
Italian ita_Latn
|
86 |
+
Javanese jav_Latn
|
87 |
+
Japanese jpn_Jpan
|
88 |
+
Kabyle kab_Latn
|
89 |
+
Jingpho kac_Latn
|
90 |
+
Kamba kam_Latn
|
91 |
+
Kannada kan_Knda
|
92 |
+
Kashmiri (Arabic script) kas_Arab
|
93 |
+
Kashmiri (Devanagari script) kas_Deva
|
94 |
+
Georgian kat_Geor
|
95 |
+
Kazakh kaz_Cyrl
|
96 |
+
Kabiyè kbp_Latn
|
97 |
+
Kabuverdianu kea_Latn
|
98 |
+
Halh Mongolian khk_Cyrl
|
99 |
+
Khmer (Central) khm_Khmr
|
100 |
+
Kikuyu kik_Latn
|
101 |
+
Kinyarwanda kin_Latn
|
102 |
+
Kyrgyz kir_Cyrl
|
103 |
+
Kimbundu kmb_Latn
|
104 |
+
Northern Kurdish kmr_Latn
|
105 |
+
Central Kanuri (Arabic script) knc_Arab
|
106 |
+
Central Kanuri (Latin script) knc_Latn
|
107 |
+
Korean kor_Hang
|
108 |
+
Kituba (DRC) ktu_Latn
|
109 |
+
Lao lao_Laoo
|
110 |
+
Ligurian (Genoese) lij_Latn
|
111 |
+
Limburgish lim_Latn
|
112 |
+
Lingala lin_Latn
|
113 |
+
Lithuanian lit_Latn
|
114 |
+
Lombard lmo_Latn
|
115 |
+
Latgalian ltg_Latn
|
116 |
+
Luxembourgish ltz_Latn
|
117 |
+
Luba-Kasai lua_Latn
|
118 |
+
Ganda lug_Latn
|
119 |
+
Luo luo_Latn
|
120 |
+
Mizo lus_Latn
|
121 |
+
Standard Latvian lvs_Latn
|
122 |
+
Magahi mag_Deva
|
123 |
+
Maithili mai_Deva
|
124 |
+
Malayalam mal_Mlym
|
125 |
+
Marathi mar_Deva
|
126 |
+
Meadow Mari mhr_Cyrl
|
127 |
+
Minangkabau (Jawi script) min_Arab
|
128 |
+
Minangkabau (Latin script) min_Latn
|
129 |
+
Macedonian mkd_Cyrl
|
130 |
+
Maltese mlt_Latn
|
131 |
+
Meitei (Manipuri, Bengali script) mni_Beng
|
132 |
+
Meitei (Manipuri, Meitei script) mni_Mtei
|
133 |
+
Mossi mos_Latn
|
134 |
+
Maori mri_Latn
|
135 |
+
Burmese mya_Mymr
|
136 |
+
Dutch nld_Latn
|
137 |
+
Norwegian Nynorsk nno_Latn
|
138 |
+
Norwegian Bokmål nob_Latn
|
139 |
+
Nepali npi_Deva
|
140 |
+
Nko nqo_Nkoo
|
141 |
+
Northern Sotho nso_Latn
|
142 |
+
Nuer nus_Latn
|
143 |
+
Nyanja nya_Latn
|
144 |
+
Occitan oci_Latn
|
145 |
+
Odia ory_Orya
|
146 |
+
Pangasinan pag_Latn
|
147 |
+
Eastern Panjabi pan_Guru
|
148 |
+
Papiamento pap_Latn
|
149 |
+
Southern Pashto pbt_Arab
|
150 |
+
Western Persian pes_Arab
|
151 |
+
Plateau Malagasy plt_Latn
|
152 |
+
Polish pol_Latn
|
153 |
+
Portuguese (Brazilian) por_Latn
|
154 |
+
Dari prs_Arab
|
155 |
+
Ayacucho Quechua quy_Latn
|
156 |
+
Romanian ron_Latn
|
157 |
+
Rundi run_Latn
|
158 |
+
Russian rus_Cyrl
|
159 |
+
Sango sag_Latn
|
160 |
+
Sanskrit san_Deva
|
161 |
+
Santali sat_Olck
|
162 |
+
Sicilian scn_Latn
|
163 |
+
Shan shn_Mymr
|
164 |
+
Sinhala sin_Sinh
|
165 |
+
Slovak slk_Latn
|
166 |
+
Slovenian slv_Latn
|
167 |
+
Samoan smo_Latn
|
168 |
+
Shona sna_Latn
|
169 |
+
Sindhi (Arabic script) snd_Arab
|
170 |
+
Sindhi (Devanagari script) snd_Deva
|
171 |
+
Somali som_Latn
|
172 |
+
Southern Sotho sot_Latn
|
173 |
+
Spanish (Latin American) spa_Latn
|
174 |
+
Sardinian srd_Latn
|
175 |
+
Serbian srp_Cyrl
|
176 |
+
Swati ssw_Latn
|
177 |
+
Sundanese sun_Latn
|
178 |
+
Swedish swe_Latn
|
179 |
+
Swahili swh_Latn
|
180 |
+
Silesian szl_Latn
|
181 |
+
Tamil tam_Taml
|
182 |
+
Tamasheq (Latin script) taq_Latn
|
183 |
+
Tamasheq (Tifinagh script) taq_Tfng
|
184 |
+
Tatar tat_Cyrl
|
185 |
+
Telugu tel_Telu
|
186 |
+
Tajik tgk_Cyrl
|
187 |
+
Thai tha_Thai
|
188 |
+
Tigrinya tir_Ethi
|
189 |
+
Tok Pisin tpi_Latn
|
190 |
+
Tswana tsn_Latn
|
191 |
+
Tsonga tso_Latn
|
192 |
+
Turkmen tuk_Latn
|
193 |
+
Tumbuka tum_Latn
|
194 |
+
Turkish tur_Latn
|
195 |
+
Akuapem Twi twi_Latn
|
196 |
+
Asante Twi twi_Latn
|
197 |
+
Uyghur uig_Arab
|
198 |
+
Ukrainian ukr_Cyrl
|
199 |
+
Umbundu umb_Latn
|
200 |
+
Urdu urd_Arab
|
201 |
+
Northern Uzbek uzn_Latn
|
202 |
+
Venetian vec_Latn
|
203 |
+
Vietnamese vie_Latn
|
204 |
+
Waray war_Latn
|
205 |
+
Wolof wol_Latn
|
206 |
+
Xhosa xho_Latn
|
207 |
+
Eastern Yiddish ydd_Hebr
|
208 |
+
Yoruba yor_Latn
|
209 |
+
Yue Chinese (Hong Kong Cantonese) yue_Hant
|
210 |
+
Standard Moroccan Tamazight zgh_Tfng
|
211 |
+
Standard Malay zsm_Latn
|
212 |
+
Zulu zul_Latn '''
|
213 |
+
codes_as_string = codes_as_string_new.split('\n')
|
214 |
+
|
215 |
+
flores_codes_latest = {}
|
216 |
+
for code in codes_as_string:
|
217 |
+
code = code.strip() # Remove leading and trailing whitespace
|
218 |
+
print("Processing code:", code)
|
219 |
+
lang, lang_code = code.split('\t')
|
220 |
+
flores_codes_latest[lang] = lang_code
|
221 |
+
|
222 |
+
|