natural language toolkit language codes c 20222023 nltk project eric kafe kafe ericgmail com url https www nltk org for license information see license txt iso6393 language codes c https iso6393 sil org translate between language names and language codes the iso6393 language codes were downloaded from the registration ity at https iso6393 sil org the iso6393 codeset is evolving so retired language codes are kept in the iso639retired dictionary which is used as fallback by the wrapper functions langname and langcode in order to support the lookup of retired codes the langcode function returns the current iso6393 code if there is one and falls back to the retired code otherwise as specified by bcp47 it returns the shortest 2letter code by default but 3letter codes are also available import nltk langnames as lgn lgn langname fri fri is a retired code western frisian the current code is different from the retired one lgn langcode western frisian fy lgn langcode western frisian typ 3 fry convert a composite bcp47 tag to a language name from nltk langnames import langname langname calatnesvalencia catalan latin spain valencian langname calatnesvalencia typshort catalan convert language name to iso6393 language code returns the short 2letter code by default if one is available and the 3letter code otherwise from nltk langnames import langcode langcode modern greek 1453 el specify typ3 to get the 3letter code langcode modern greek 1453 typ3 ell translate betwwen wikidata qcodes and bcp47 codes or names convert bcp47 tag to wikidata qcode tag2q ndsusddemv q4289225 convert wikidata qcode to bcp47 tag q2tag q4289225 ndsusddemv convert wikidata qcode to bcp47 full or short language name q2name q4289225 low german mecklenburgvorpommern q2name q4289225 short low german convert simple language name to wikidata qcode lang2q low german q25433 data dictionaries return inverse mapping but only if it is bijective if lendic keys lensetdic values return val key for key val in dic items else warnthis dictionary has no bijective inverse mapping bcp47 loadwikiq wikidata conversion table needs to be loaded explicitly wikibcp47 inversedictbcp47 wikiq iso639short aar aa abk ab afr af aka ak amh am ara ar arg an asm as ava av ave ae aym ay aze az bak ba bam bm bel be ben bn bis bi bod bo bos bs bre br bul bg cat ca ces cs cha ch che ce chu cu chv cv cor kw cos co cre cr cym cy dan da deu de div dv dzo dz ell el eng en epo eo est et eus eu ewe ee fao fo fas fa fij fj fin fi fra fr fry fy ful ff gla gd gle ga glg gl glv gv grn gn guj gu hat ht hau ha hbs sh heb he her hz hin hi hmo ho hrv hr hun hu hye hy ibo ig ido io iii ii iku iu ile ie ina ia ind id ipk ik isl is ita it jav jv jpn ja kal kl kan kn kas ks kat ka kau kr kaz kk khm km kik ki kin rw kir ky kom kv kon kg kor ko kua kj kur ku lao lo lat la lav lv lim li lin ln lit lt ltz lb lub lu lug lg mah mh mal ml mar mr mkd mk mlg mg mlt mt mon mn mri mi msa ms mya my nau na nav nv nbl nr nde nd ndo ng nep ne nld nl nno nn nob nb nor no nya ny oci oc oji oj ori or orm om oss os pan pa pli pi pol pl por pt pus ps que qu roh rm ron ro run rn rus ru sag sg san sa sin si slk sk slv sl sme se smo sm sna sn snd sd som so sot st spa es sqi sq srd sc srp sr ssw ss sun su swa sw swe sv tah ty tam ta tat tt tel te tgk tg tgl tl tha th tir ti ton to tsn tn tso ts tuk tk tur tr twi tw uig ug ukr uk urd ur uzb uz ven ve vie vi vol vo wln wa wol wo xho xh yid yi yor yo zha za zho zh zul zu iso639retired fri western frisian auv auvergnat gsc gascon lms limousin lnc languedocien prv provenal amd amap creole bgh bogan bnh banaw bvs belgian sign language ccy southern zhuang cit chittagonian flm falam chin jap jarura kob kohoroxitari mob moinba mzf aiku nhj tlalitzlipa nahuatl nhs southeastern puebla nahuatl occ occidental tmx tomyang tot patlachicontla totonac xmi miarr yib yinglish ztc lachirioag zapotec atf atuence bqe navarrolabourdin basque bsz souletin basque aex amerax ahe ahe aiz aari akn amikoana arf arafundi azr adzera bcx pamona bii bisu bke bengkulu blu hmong njua boc bakung kenyah bsd sarawak bisaya bwv bahau river kenyah bxt buxinhua byu buyang ccx northern zhuang cru cartana dat darang deng dyk land dayak eni enim fiz izere gen geman deng ggh garrehajuran itu itutang kds lahu shi knh kayan river kenyah krg north korowai krq krui kxg katingan lmt lematang lnt lintang lod berawan mbg northern nambikura mdo southwest gbaya mhv arakanese miv mimi mqd madang nky khiamniungan naga nxj nyadu ogn ogan ork orokaiva paj ipekatapuia pec southern pesisir pen penesak plm palembang poj lower pokomo pun pubian rae ranau rjb rajbanshi rws rawas sdd semendo sdi sindang kelingi skl selako slb kahumamahon saluan srj serawai suf tarpia suh suba suu sungkai szk sizaki tle southern marakwet tnj tanjong ttx tutong 1 ubm upper baram kenyah vky kayu agung vmo mukomuko wre ware xah kahayan xkm mahakam kenyah xuf kunfal yio dayao yi ymj muji yi ypl pula yi ypw puwa yi ywm wumeng yi yym yuanjiangmojiang yi mly malay individual language muw mundari xst silt e ope old persian scc serbian scr croatian xsk sakan mol moldavian aay aariya acc cubulco ach cbm yepocapa southwestern cakchiquel chs chumash ckc northern cakchiquel ckd south central cakchiquel cke eastern cakchiquel ckf southern cakchiquel cki santa mara de jess cakchiquel ckj santo domingo xenacoj cakchiquel ckk acatenango southwestern cakchiquel ckw western cakchiquel cnm ixtatn chuj cti tila chol cun cunn quich eml emilianoromagnolo eur europanto gmo gamogofadawro hsf southeastern huastec hva san lus potos huastec ixi nebaj ixil ixj chajul ixil jai western jacalteco mms southern mam mpf tajumulco mam mtz tacanec mvc central mam mvj todos santos cuchumatn mam poa eastern pokomam pob western pokomch pou southern pokomam ppv papav quj joyabaj quich qut west central quich quu eastern quich qxi san andrs quich sic malinguat stc santa cruz tlz toala tzb bachajn tzeltal tzc chamula tzotzil tze chenalh tzotzil tzs san andrs larrainzar tzotzil tzt western tzutujil tzu huixtn tzotzil tzz zinacantn tzotzil vlr vatrata yus chan santa cruz maya nfg nyeng nfk shakara agp paranan bhk albay bicolano bkb finallig btb beti cameroon cjr chorotega cmk chimakum drh darkhat drw darwazi gav gabutamon mof moheganmontauknarragansett mst cataelano mandaya myt sangab mandaya rmr cal sgl sanglechiishkashimi sul surigaonon sum sumomayangna tnf tangshewi wgw wagawaga ayx ayi china bjq southern betsimisaraka malagasy dha dhanwar india dkl kolum so dogon mja mahei nbf naxi noo nootka tie tingal tkk takpa baz tunen bjd bandjigali ccq chaungtha cka khumi awa chin dap nisi india dwl walo kumbe dogon elp elpaputih gbc garawa gio gelao hrr horuru ibi ibilo jar jarawa nigeria kdv kado kgh upper tanudan kalinga kpp paku karen kzh kenuzidongola lcq luhu mgx omati nln durango nahuatl pbz palu pgy pongyong sca sansu tlw south wemale unp worora wiw wirangu ybd yangbye yen yendang yma yamphe daf dan djl djiwarli ggr aghu tharnggalu ilw talur izi iziezaaikwomgbo meg mea mld malakhel mnt maykulan mwd mudbura myq forest maninka nbx ngura nlr ngarla pcr panang ppr piru tgg tangga wit wintu xia xiandao yiy yir yoront yos yos emo emok ggm gugu mini leg lengua lmm lamam mhh maskoy pidgin puz purum naga sap sanapan yuu yugh aam aramanik adp adap aue kxauein bmy bemba democratic republic of congo bxx borna democratic republic of congo byy buya dzd daza gfx mangetti dune xung gti gbatiri ime imeraguen kbf kakauhua koj sara dunjo kwq kwak kxe kakihum lii lingkhim mwj maligo nnx ngong oun oung pmu mirpur panjabi sgo songa thx the tsf southwestern tamang uok uokha xsj subi yds yiddish sign language ymt matortaygikaragas ynh yangho bgm baga mboteni btl bhatola cbe chipiajes cbh cagua coy coyaima cqu chilean quechua cum cumeral duj dhuwal ggn eastern gurung ggo southern gondi guv gey iap iapama ill iranun kgc kasseng kox coxima ktr kota marudu tinagas kvs kunggara kzj coastal kadazan kzt tambunan dusun nad nijadali nts natagaimas ome omejes pmc palumata pod ponares ppa pao pry pray 3 rna runa svr savara tdu tempasuk dusun thc tai hang tong tid tidong tmp tai mne tne tinoc kallahan toe tomedes xba kamba brazil xbx kabix xip xipinwa xkh karahawyana yri yar jeg jeng kgd kataang krm krim prb lua puk pu ko rie rien rsi rennellese sign language skk sok snh shinabo lsg lyons sign language mwx mediak mwy mosiro ncp ndaktup ais nataoran amis asd asas dit dirari dud hunsaare lba lui llo khlor myd maramba myi mina india nns ningye aoh arma ayy tayabas ayta bbz babalia creole arabic bpb barbacoas cca cauca cdg chamari dgu degaru drr dororo ekc eastern karnic gli guliguli kjf khalaj kxl nepali kurux kxu kui india lmz lumbee nxu narau plp palpa sdm semandang tbb tapeba xrq karranga xtz tasmanian zir ziriya thw thudam bic bikaru bij vaghatyabijimlegeri blg balau gji geji mvm muya ngo ngoni pat papitalai vki ijazuba wra warapu ajt judeotunisian arabic cug chungmboko lak laka nigeria lno lango south sudan pii pini smd sama snb sebuyau uun kulonpazeh wrd warduji wya wyandot iso639long inversedictiso639short iso639coderetired inversedictiso639retired natural language toolkit language codes c 2022 2023 nltk project eric kafe kafe eric gmail com url https www nltk org for license information see license txt iso639 3 language codes c https iso639 3 sil org translate between language names and language codes the iso639 3 language codes were downloaded from the registration ity at https iso639 3 sil org the iso639 3 codeset is evolving so retired language codes are kept in the iso639retired dictionary which is used as fallback by the wrapper functions langname and langcode in order to support the lookup of retired codes the langcode function returns the current iso639 3 code if there is one and falls back to the retired code otherwise as specified by bcp 47 it returns the shortest 2 letter code by default but 3 letter codes are also available import nltk langnames as lgn lgn langname fri fri is a retired code western frisian the current code is different from the retired one lgn langcode western frisian fy lgn langcode western frisian typ 3 fry convert a composite bcp 47 tag to a language name from nltk langnames import langname langname ca latn es valencia catalan latin spain valencian langname ca latn es valencia typ short catalan retired codes 3 letter codes convert to 2 letter code parse according to bcp 47 include all subtags only the language subtag convert language name to iso639 3 language code returns the short 2 letter code by default if one is available and the 3 letter code otherwise from nltk langnames import langcode langcode modern greek 1453 el specify typ 3 to get the 3 letter code langcode modern greek 1453 typ 3 ell convert to 3 letter code translate betwwen wikidata q codes and bcp 47 codes or names convert bcp 47 tag to wikidata q code tag2q nds u sd demv q4289225 convert wikidata q code to bcp 47 tag q2tag q4289225 nds u sd demv convert wikidata q code to bcp 47 full or short language name q2name q4289225 low german mecklenburg vorpommern q2name q4289225 short low german convert simple language name to wikidata q code lang2q low german q25433 data dictionaries return inverse mapping but only if it is bijective wikidata conversion table needs to be loaded explicitly
import re
from warnings import warn

from nltk.corpus import bcp47

codepattern = re.compile("[a-z][a-z][a-z]?")


def langname(tag, typ="full"):
    
    tags = tag.split("-")
    code = tags[0].lower()
    if codepattern.fullmatch(code):
        if code in iso639retired:  
            return iso639retired[code]
        elif code in iso639short:  
            code2 = iso639short[code]  
            warn(f"Shortening {code!r} to {code2!r}", stacklevel=2)
            tag = "-".join([code2] + tags[1:])
        name = bcp47.name(tag)  
        if typ == "full":
            return name  
        elif name:
            return name.split(":")[0]  
    else:
        warn(f"Could not find code in {code!r}", stacklevel=2)


def langcode(name, typ=2):
    
    if name in bcp47.langcode:
        code = bcp47.langcode[name]
        if typ == 3 and code in iso639long:
            code = iso639long[code]  
        return code
    elif name in iso639code_retired:
        return iso639code_retired[name]
    else:
        warn(f"Could not find language in {name!r}", stacklevel=2)







def tag2q(tag):
    
    return bcp47.wiki_q[tag]


def q2tag(qcode):
    
    return wiki_bcp47[qcode]


def q2name(qcode, typ="full"):
    
    return langname(q2tag(qcode), typ)


def lang2q(name):
    
    return tag2q(langcode(name))







def inverse_dict(dic):
    
    if len(dic.keys()) == len(set(dic.values())):
        return {val: key for (key, val) in dic.items()}
    else:
        warn("This dictionary has no bijective inverse mapping.")


bcp47.load_wiki_q()  
wiki_bcp47 = inverse_dict(bcp47.wiki_q)

iso639short = {
    "aar": "aa",
    "abk": "ab",
    "afr": "af",
    "aka": "ak",
    "amh": "am",
    "ara": "ar",
    "arg": "an",
    "asm": "as",
    "ava": "av",
    "ave": "ae",
    "aym": "ay",
    "aze": "az",
    "bak": "ba",
    "bam": "bm",
    "bel": "be",
    "ben": "bn",
    "bis": "bi",
    "bod": "bo",
    "bos": "bs",
    "bre": "br",
    "bul": "bg",
    "cat": "ca",
    "ces": "cs",
    "cha": "ch",
    "che": "ce",
    "chu": "cu",
    "chv": "cv",
    "cor": "kw",
    "cos": "co",
    "cre": "cr",
    "cym": "cy",
    "dan": "da",
    "deu": "de",
    "div": "dv",
    "dzo": "dz",
    "ell": "el",
    "eng": "en",
    "epo": "eo",
    "est": "et",
    "eus": "eu",
    "ewe": "ee",
    "fao": "fo",
    "fas": "fa",
    "fij": "fj",
    "fin": "fi",
    "fra": "fr",
    "fry": "fy",
    "ful": "ff",
    "gla": "gd",
    "gle": "ga",
    "glg": "gl",
    "glv": "gv",
    "grn": "gn",
    "guj": "gu",
    "hat": "ht",
    "hau": "ha",
    "hbs": "sh",
    "heb": "he",
    "her": "hz",
    "hin": "hi",
    "hmo": "ho",
    "hrv": "hr",
    "hun": "hu",
    "hye": "hy",
    "ibo": "ig",
    "ido": "io",
    "iii": "ii",
    "iku": "iu",
    "ile": "ie",
    "ina": "ia",
    "ind": "id",
    "ipk": "ik",
    "isl": "is",
    "ita": "it",
    "jav": "jv",
    "jpn": "ja",
    "kal": "kl",
    "kan": "kn",
    "kas": "ks",
    "kat": "ka",
    "kau": "kr",
    "kaz": "kk",
    "khm": "km",
    "kik": "ki",
    "kin": "rw",
    "kir": "ky",
    "kom": "kv",
    "kon": "kg",
    "kor": "ko",
    "kua": "kj",
    "kur": "ku",
    "lao": "lo",
    "lat": "la",
    "lav": "lv",
    "lim": "li",
    "lin": "ln",
    "lit": "lt",
    "ltz": "lb",
    "lub": "lu",
    "lug": "lg",
    "mah": "mh",
    "mal": "ml",
    "mar": "mr",
    "mkd": "mk",
    "mlg": "mg",
    "mlt": "mt",
    "mon": "mn",
    "mri": "mi",
    "msa": "ms",
    "mya": "my",
    "nau": "na",
    "nav": "nv",
    "nbl": "nr",
    "nde": "nd",
    "ndo": "ng",
    "nep": "ne",
    "nld": "nl",
    "nno": "nn",
    "nob": "nb",
    "nor": "no",
    "nya": "ny",
    "oci": "oc",
    "oji": "oj",
    "ori": "or",
    "orm": "om",
    "oss": "os",
    "pan": "pa",
    "pli": "pi",
    "pol": "pl",
    "por": "pt",
    "pus": "ps",
    "que": "qu",
    "roh": "rm",
    "ron": "ro",
    "run": "rn",
    "rus": "ru",
    "sag": "sg",
    "san": "sa",
    "sin": "si",
    "slk": "sk",
    "slv": "sl",
    "sme": "se",
    "smo": "sm",
    "sna": "sn",
    "snd": "sd",
    "som": "so",
    "sot": "st",
    "spa": "es",
    "sqi": "sq",
    "srd": "sc",
    "srp": "sr",
    "ssw": "ss",
    "sun": "su",
    "swa": "sw",
    "swe": "sv",
    "tah": "ty",
    "tam": "ta",
    "tat": "tt",
    "tel": "te",
    "tgk": "tg",
    "tgl": "tl",
    "tha": "th",
    "tir": "ti",
    "ton": "to",
    "tsn": "tn",
    "tso": "ts",
    "tuk": "tk",
    "tur": "tr",
    "twi": "tw",
    "uig": "ug",
    "ukr": "uk",
    "urd": "ur",
    "uzb": "uz",
    "ven": "ve",
    "vie": "vi",
    "vol": "vo",
    "wln": "wa",
    "wol": "wo",
    "xho": "xh",
    "yid": "yi",
    "yor": "yo",
    "zha": "za",
    "zho": "zh",
    "zul": "zu",
}


iso639retired = {
    "fri": "Western Frisian",
    "auv": "Auvergnat",
    "gsc": "Gascon",
    "lms": "Limousin",
    "lnc": "Languedocien",
    "prv": "Provençal",
    "amd": "Amapá Creole",
    "bgh": "Bogan",
    "bnh": "Banawá",
    "bvs": "Belgian Sign Language",
    "ccy": "Southern Zhuang",
    "cit": "Chittagonian",
    "flm": "Falam Chin",
    "jap": "Jaruára",
    "kob": "Kohoroxitari",
    "mob": "Moinba",
    "mzf": "Aiku",
    "nhj": "Tlalitzlipa Nahuatl",
    "nhs": "Southeastern Puebla Nahuatl",
    "occ": "Occidental",
    "tmx": "Tomyang",
    "tot": "Patla-Chicontla Totonac",
    "xmi": "Miarrã",
    "yib": "Yinglish",
    "ztc": "Lachirioag Zapotec",
    "atf": "Atuence",
    "bqe": "Navarro-Labourdin Basque",
    "bsz": "Souletin Basque",
    "aex": "Amerax",
    "ahe": "Ahe",
    "aiz": "Aari",
    "akn": "Amikoana",
    "arf": "Arafundi",
    "azr": "Adzera",
    "bcx": "Pamona",
    "bii": "Bisu",
    "bke": "Bengkulu",
    "blu": "Hmong Njua",
    "boc": "Bakung Kenyah",
    "bsd": "Sarawak Bisaya",
    "bwv": "Bahau River Kenyah",
    "bxt": "Buxinhua",
    "byu": "Buyang",
    "ccx": "Northern Zhuang",
    "cru": "Carútana",
    "dat": "Darang Deng",
    "dyk": "Land Dayak",
    "eni": "Enim",
    "fiz": "Izere",
    "gen": "Geman Deng",
    "ggh": "Garreh-Ajuran",
    "itu": "Itutang",
    "kds": "Lahu Shi",
    "knh": "Kayan River Kenyah",
    "krg": "North Korowai",
    "krq": "Krui",
    "kxg": "Katingan",
    "lmt": "Lematang",
    "lnt": "Lintang",
    "lod": "Berawan",
    "mbg": "Northern Nambikuára",
    "mdo": "Southwest Gbaya",
    "mhv": "Arakanese",
    "miv": "Mimi",
    "mqd": "Madang",
    "nky": "Khiamniungan Naga",
    "nxj": "Nyadu",
    "ogn": "Ogan",
    "ork": "Orokaiva",
    "paj": "Ipeka-Tapuia",
    "pec": "Southern Pesisir",
    "pen": "Penesak",
    "plm": "Palembang",
    "poj": "Lower Pokomo",
    "pun": "Pubian",
    "rae": "Ranau",
    "rjb": "Rajbanshi",
    "rws": "Rawas",
    "sdd": "Semendo",
    "sdi": "Sindang Kelingi",
    "skl": "Selako",
    "slb": "Kahumamahon Saluan",
    "srj": "Serawai",
    "suf": "Tarpia",
    "suh": "Suba",
    "suu": "Sungkai",
    "szk": "Sizaki",
    "tle": "Southern Marakwet",
    "tnj": "Tanjong",
    "ttx": "Tutong 1",
    "ubm": "Upper Baram Kenyah",
    "vky": "Kayu Agung",
    "vmo": "Muko-Muko",
    "wre": "Ware",
    "xah": "Kahayan",
    "xkm": "Mahakam Kenyah",
    "xuf": "Kunfal",
    "yio": "Dayao Yi",
    "ymj": "Muji Yi",
    "ypl": "Pula Yi",
    "ypw": "Puwa Yi",
    "ywm": "Wumeng Yi",
    "yym": "Yuanjiang-Mojiang Yi",
    "mly": "Malay (individual language)",
    "muw": "Mundari",
    "xst": "Silt'e",
    "ope": "Old Persian",
    "scc": "Serbian",
    "scr": "Croatian",
    "xsk": "Sakan",
    "mol": "Moldavian",
    "aay": "Aariya",
    "acc": "Cubulco Achí",
    "cbm": "Yepocapa Southwestern Cakchiquel",
    "chs": "Chumash",
    "ckc": "Northern Cakchiquel",
    "ckd": "South Central Cakchiquel",
    "cke": "Eastern Cakchiquel",
    "ckf": "Southern Cakchiquel",
    "cki": "Santa María De Jesús Cakchiquel",
    "ckj": "Santo Domingo Xenacoj Cakchiquel",
    "ckk": "Acatenango Southwestern Cakchiquel",
    "ckw": "Western Cakchiquel",
    "cnm": "Ixtatán Chuj",
    "cti": "Tila Chol",
    "cun": "Cunén Quiché",
    "eml": "Emiliano-Romagnolo",
    "eur": "Europanto",
    "gmo": "Gamo-Gofa-Dawro",
    "hsf": "Southeastern Huastec",
    "hva": "San Luís Potosí Huastec",
    "ixi": "Nebaj Ixil",
    "ixj": "Chajul Ixil",
    "jai": "Western Jacalteco",
    "mms": "Southern Mam",
    "mpf": "Tajumulco Mam",
    "mtz": "Tacanec",
    "mvc": "Central Mam",
    "mvj": "Todos Santos Cuchumatán Mam",
    "poa": "Eastern Pokomam",
    "pob": "Western Pokomchí",
    "pou": "Southern Pokomam",
    "ppv": "Papavô",
    "quj": "Joyabaj Quiché",
    "qut": "West Central Quiché",
    "quu": "Eastern Quiché",
    "qxi": "San Andrés Quiché",
    "sic": "Malinguat",
    "stc": "Santa Cruz",
    "tlz": "Toala'",
    "tzb": "Bachajón Tzeltal",
    "tzc": "Chamula Tzotzil",
    "tze": "Chenalhó Tzotzil",
    "tzs": "San Andrés Larrainzar Tzotzil",
    "tzt": "Western Tzutujil",
    "tzu": "Huixtán Tzotzil",
    "tzz": "Zinacantán Tzotzil",
    "vlr": "Vatrata",
    "yus": "Chan Santa Cruz Maya",
    "nfg": "Nyeng",
    "nfk": "Shakara",
    "agp": "Paranan",
    "bhk": "Albay Bicolano",
    "bkb": "Finallig",
    "btb": "Beti (Cameroon)",
    "cjr": "Chorotega",
    "cmk": "Chimakum",
    "drh": "Darkhat",
    "drw": "Darwazi",
    "gav": "Gabutamon",
    "mof": "Mohegan-Montauk-Narragansett",
    "mst": "Cataelano Mandaya",
    "myt": "Sangab Mandaya",
    "rmr": "Caló",
    "sgl": "Sanglechi-Ishkashimi",
    "sul": "Surigaonon",
    "sum": "Sumo-Mayangna",
    "tnf": "Tangshewi",
    "wgw": "Wagawaga",
    "ayx": "Ayi (China)",
    "bjq": "Southern Betsimisaraka Malagasy",
    "dha": "Dhanwar (India)",
    "dkl": "Kolum So Dogon",
    "mja": "Mahei",
    "nbf": "Naxi",
    "noo": "Nootka",
    "tie": "Tingal",
    "tkk": "Takpa",
    "baz": "Tunen",
    "bjd": "Bandjigali",
    "ccq": "Chaungtha",
    "cka": "Khumi Awa Chin",
    "dap": "Nisi (India)",
    "dwl": "Walo Kumbe Dogon",
    "elp": "Elpaputih",
    "gbc": "Garawa",
    "gio": "Gelao",
    "hrr": "Horuru",
    "ibi": "Ibilo",
    "jar": "Jarawa (Nigeria)",
    "kdv": "Kado",
    "kgh": "Upper Tanudan Kalinga",
    "kpp": "Paku Karen",
    "kzh": "Kenuzi-Dongola",
    "lcq": "Luhu",
    "mgx": "Omati",
    "nln": "Durango Nahuatl",
    "pbz": "Palu",
    "pgy": "Pongyong",
    "sca": "Sansu",
    "tlw": "South Wemale",
    "unp": "Worora",
    "wiw": "Wirangu",
    "ybd": "Yangbye",
    "yen": "Yendang",
    "yma": "Yamphe",
    "daf": "Dan",
    "djl": "Djiwarli",
    "ggr": "Aghu Tharnggalu",
    "ilw": "Talur",
    "izi": "Izi-Ezaa-Ikwo-Mgbo",
    "meg": "Mea",
    "mld": "Malakhel",
    "mnt": "Maykulan",
    "mwd": "Mudbura",
    "myq": "Forest Maninka",
    "nbx": "Ngura",
    "nlr": "Ngarla",
    "pcr": "Panang",
    "ppr": "Piru",
    "tgg": "Tangga",
    "wit": "Wintu",
    "xia": "Xiandao",
    "yiy": "Yir Yoront",
    "yos": "Yos",
    "emo": "Emok",
    "ggm": "Gugu Mini",
    "leg": "Lengua",
    "lmm": "Lamam",
    "mhh": "Maskoy Pidgin",
    "puz": "Purum Naga",
    "sap": "Sanapaná",
    "yuu": "Yugh",
    "aam": "Aramanik",
    "adp": "Adap",
    "aue": "ǂKxʼauǁʼein",
    "bmy": "Bemba (Democratic Republic of Congo)",
    "bxx": "Borna (Democratic Republic of Congo)",
    "byy": "Buya",
    "dzd": "Daza",
    "gfx": "Mangetti Dune ǃXung",
    "gti": "Gbati-ri",
    "ime": "Imeraguen",
    "kbf": "Kakauhua",
    "koj": "Sara Dunjo",
    "kwq": "Kwak",
    "kxe": "Kakihum",
    "lii": "Lingkhim",
    "mwj": "Maligo",
    "nnx": "Ngong",
    "oun": "ǃOǃung",
    "pmu": "Mirpur Panjabi",
    "sgo": "Songa",
    "thx": "The",
    "tsf": "Southwestern Tamang",
    "uok": "Uokha",
    "xsj": "Subi",
    "yds": "Yiddish Sign Language",
    "ymt": "Mator-Taygi-Karagas",
    "ynh": "Yangho",
    "bgm": "Baga Mboteni",
    "btl": "Bhatola",
    "cbe": "Chipiajes",
    "cbh": "Cagua",
    "coy": "Coyaima",
    "cqu": "Chilean Quechua",
    "cum": "Cumeral",
    "duj": "Dhuwal",
    "ggn": "Eastern Gurung",
    "ggo": "Southern Gondi",
    "guv": "Gey",
    "iap": "Iapama",
    "ill": "Iranun",
    "kgc": "Kasseng",
    "kox": "Coxima",
    "ktr": "Kota Marudu Tinagas",
    "kvs": "Kunggara",
    "kzj": "Coastal Kadazan",
    "kzt": "Tambunan Dusun",
    "nad": "Nijadali",
    "nts": "Natagaimas",
    "ome": "Omejes",
    "pmc": "Palumata",
    "pod": "Ponares",
    "ppa": "Pao",
    "pry": "Pray 3",
    "rna": "Runa",
    "svr": "Savara",
    "tdu": "Tempasuk Dusun",
    "thc": "Tai Hang Tong",
    "tid": "Tidong",
    "tmp": "Tai Mène",
    "tne": "Tinoc Kallahan",
    "toe": "Tomedes",
    "xba": "Kamba (Brazil)",
    "xbx": "Kabixí",
    "xip": "Xipináwa",
    "xkh": "Karahawyana",
    "yri": "Yarí",
    "jeg": "Jeng",
    "kgd": "Kataang",
    "krm": "Krim",
    "prb": "Lua'",
    "puk": "Pu Ko",
    "rie": "Rien",
    "rsi": "Rennellese Sign Language",
    "skk": "Sok",
    "snh": "Shinabo",
    "lsg": "Lyons Sign Language",
    "mwx": "Mediak",
    "mwy": "Mosiro",
    "ncp": "Ndaktup",
    "ais": "Nataoran Amis",
    "asd": "Asas",
    "dit": "Dirari",
    "dud": "Hun-Saare",
    "lba": "Lui",
    "llo": "Khlor",
    "myd": "Maramba",
    "myi": "Mina (India)",
    "nns": "Ningye",
    "aoh": "Arma",
    "ayy": "Tayabas Ayta",
    "bbz": "Babalia Creole Arabic",
    "bpb": "Barbacoas",
    "cca": "Cauca",
    "cdg": "Chamari",
    "dgu": "Degaru",
    "drr": "Dororo",
    "ekc": "Eastern Karnic",
    "gli": "Guliguli",
    "kjf": "Khalaj",
    "kxl": "Nepali Kurux",
    "kxu": "Kui (India)",
    "lmz": "Lumbee",
    "nxu": "Narau",
    "plp": "Palpa",
    "sdm": "Semandang",
    "tbb": "Tapeba",
    "xrq": "Karranga",
    "xtz": "Tasmanian",
    "zir": "Ziriya",
    "thw": "Thudam",
    "bic": "Bikaru",
    "bij": "Vaghat-Ya-Bijim-Legeri",
    "blg": "Balau",
    "gji": "Geji",
    "mvm": "Muya",
    "ngo": "Ngoni",
    "pat": "Papitalai",
    "vki": "Ija-Zuba",
    "wra": "Warapu",
    "ajt": "Judeo-Tunisian Arabic",
    "cug": "Chungmboko",
    "lak": "Laka (Nigeria)",
    "lno": "Lango (South Sudan)",
    "pii": "Pini",
    "smd": "Sama",
    "snb": "Sebuyau",
    "uun": "Kulon-Pazeh",
    "wrd": "Warduji",
    "wya": "Wyandot",
}


iso639long = inverse_dict(iso639short)

iso639code_retired = inverse_dict(iso639retired)