Bu modul uchun Modul:Guthrie codes/doc nomli hujjat sahifasini yaratishingiz mumkin

local export = {}
local codes = {
    ["bdu"] = "A101",
    ["bnt-bal"] = "A13",
    ["bvg"] = "A14",
    ["bwt"] = "A141",
    ["mbo"] = "A15",
    ["bsi"] = "A15B",
    ["bss"] = "A15C",
    ["bqz"] = "A15C", --maybe merge A15?
    ["nkc"] = "A151",
    ["bqm"] = "A21",
    ["bri"] = "A22",
    ["bbx"] = "A221",
    ["szv"] = "A23",
    ["kme"] = "A231",
    ["dua"] = "A24",
    ["mzd"] = "A27",
    ["bvb"] = "A31",
    ["bnm"] = "A32",
    ["yko"] = "A33",
    ["nui"] = "A33b",
    ["bng"] = "A34",
    ["bbi"] = "A41",
    ["abb"] = "A42",
    ["bas"] = "A43a",
    ["bkh"] = "A43b",
    ["tvu"] = "A44",
    ["lem"] = "A46",
    ["ttf"] = "A461",
    ["yat"] = "A462",
    ["hij"] = "A501",
    ["lfa"] = "A51",
    ["dii"] = "A52",
    ["ksf"] = "A53",
    ["ngy"] = "A54",
    ["bag"] = "A601",
    ["yav"] = "A62A",
    ["mmu"] = "A62B",
    ["ekm"] = "A62C",
    ["baf"] = "A621",
    ["yas"] = "A622",
    ["mlb"] = "A623",
    ["leo"] = "A63",
    ["btc"] = "A65",
    ["eto"] = "A71",
    ["ewo"] = "A72",
    ["beb"] = "A73a",
    ["bxp"] = "A73b",--not enough data to merge A73
    ["bum"] = "A74",
    ["fan"] = "A75",
    ["gyi"] = "A801",
    ["ukh"] = "A802",
    ["nmg"] = "A81",
    ["sox"] = "A82",
    ["mcp"] = "A83",
    ["mkk"] = "A831",
    ["biw"] = "A832",
    ["njy"] = "A84",
    ["ozm"] = "A842",
    ["bkw"] = "A85b", --add 85a?
    ["mgg"] = "A86b", --add 86a?
    ["mcx"] = "A86c",
    ["bmw"] = "A87",
    ["kwu"] = "A91",
    ["pmm"] = "A92",
    ["kkj"] = "A93",
    ["mye"] = "B11",
    ["nda"] = "B201",
    ["sxe"] = "B202",
    ["syx"] = "B203",
    ["nxo"] = "B204",
    ["syi"] = "B21",
    ["bxc"] = "B211",
    ["keb"] = "B22a",
    ["nra"] = "B22b",
    ["zmn"] = "B23",
    ["wum"] = "B24",
    ["koq"] = "B25",
    ["sak"] = "B251",
    ["mhb"] = "B252",
    ["gev"] = "B301",
    ["sbw"] = "B302", --need B303?
    ["pic"] = "B304",
    ["buw"] = "B305",
    ["tsv"] = "B31",
    ["kbs"] = "B32",
    ["bwz"] = "B401",
    ["bbg"] = "B402",
    ["vum"] = "B403",
    ["swj"] = "B41",
    ["snq"] = "B42",
    ["puu"] = "B43",
    ["lup"] = "B44",
    ["wdd"] = "B501",
    ["dma"] = "B51",
    ["nzb"] = "B52",
    ["tsa"] = "B53",
    ["kzo"] = "B602",
    ["ynh"] = "B603",
    ["mdt"] = "B61",
    ["mbm"] = "B62",
    ["nmd"] = "B63",
    ["bnt-bwa"] = "B70z",
    ["tck"] = "B701",
    ["teg"] = "B71",
    ["ngz"] = "B72",
    ["tyi"] = "B73a",
    ["lli"] = "B73b",
    ["iyx"] = "B73c",
    ["tyx"] = "B73d",
    ["nzu"] = "B74",--merged with ebo
    ["tek"] = "B75", --need East Teke B76?
    ["kkw"] = "B77a",
    ["ifm"] = "B77b",
    ["bnt-bon"] = "B80",
    ["bnt-boy"] = "B80",
    ["bnt-sbo"] = "B80",
    ["tii"] = "B81",
    ["boh"] = "B82", -- not to be confused with the bnt-sbo, bnt-bon, bnt-boy
    ["zmf"] = "B83",
    ["bnt-mpu"] = "B84",
    ["yns"] = "B85",
    ["soo"] = "B85d",
    ["diz"] = "B86",
    ["zmp"] = "B87",
    ["nlo"] = "B861",
    ["lvl"] = "B862",
    ["bnt-mpi"] = "B863",
    ["noq"] = "B864",--historically confused with another Ngongo in zone H
    ["nzd"] = "B865",
    ["bvx"] = "C101",
    ["ngd"] = "C102",
    ["axk"] = "C104",
    ["ndn"] = "C11",
    ["bkj"] = "C12",
    ["mdn"] = "C13",
    ["zmx"] = "C14",
    ["bui"] = "C15",
    ["loq"] = "C16",
    ["bkp"] = "C16", --merge C16?
    ["bml"] = "C161",
    ["bzo"] = "C162",
    ["mdu"] = "C21",
    ["akw"] = "C22",
    ["koh"] = "C24",
    ["mdw"] = "C25",
    ["kwc"] = "C26",
    ["kxx"] = "C27",
    ["bxg"] = "C30A",
    ["ln"] = "C30B",
    ["bzm"] = "C302",
    ["biz"] = "C31a",
    ["lie"] = "C31a", --merge C31a?
    ["mmz"] = "C311",
    ["ndw"] = "C312",
    ["bni"] = "C32",
    ["mow"] = "C32", --merge C32?
    ["liz"] = "C321",
    ["szg"] = "C33",
    ["skt"] = "C34",
    ["bzm"] = "C302",
    ["nto"] = "C35a",
    ["bli"] = "C35b",
    ["lse"] = "C36",
    ["bkt"] = "C36e",
    ["ndl"] = "C36g",
    ["ymg"] = "C36H",
    ["bja"] = "C37",
    ["tmv"] = "C371",
    ["pae"] = "C401",
    ["kty"] = "C403",
    ["ngc"] = "C41",
    ["bws"] = "C411",
    ["bmg"] = "C412",
    ["dzn"] = "C413",
    ["lgz"] = "C414",
    ["bwl"] = "C42", --add C43?
    ["bww"] = "C44",
    ["bbm"] = "C441",
    ["agh"] = "C45",
    ["zms"] = "C51",
    ["soc"] = "C52",
    ["pof"] = "C53",
    ["loo"] = "C54",
    ["khy"] = "C55",
    ["fom"] = "C56",
    ["pae"] = "C51",
    ["lol"] = "C61",
    ["nxd"] = "C62/63",
    ["pae"] = "C51",
    ["tll"] = "C71",
    ["hba"] = "C71",
    ["bnt-ind"] = "C71",--were we mistaken to give this its own code?
    ["ksv"] = "C72",
    ["nkw"] = "C73",
    ["kel"] = "C75",--C74 already merged into this as "Kela-Yela"
    ["oml"] = "C76",
    ["dez"] = "C81",
    ["soe"] = "C82",
    ["buf"] = "C83",
    ["lel"] = "C84",
    ["won"] = "C85",
    ["mdq"] = "D11",
    ["lej"] = "D12",
    ["zmq"] = "D13",
    ["gey"] = "D14",
    ["lik"] = "D201",
    ["bcp"] = "D21",
    ["kzy"] = "D211",
    ["rwm"] = "D22",
    ["kmw"] = "D23",
    ["sod"] = "D24",
    ["lgm"] = "D25",
    ["lea"] = "D251",
    ["khx"] = "D251",
    ["ktf"] = "D251",--merge D251?
    ["zmb"] = "D26",
    ["bnx"] = "D27",
    ["hoo"] = "D28",
    ["kbj"] = "D301",
    ["bqu"] = "D302",
    ["nbd"] = "D303",--possibly the same as myc, but need data
    ["hom"] = "D304",
    ["nyc"] = "D305",--gti D306 merged in
    ["myc"] = "D307",
    ["boy"] = "D308",
    ["bhy"] = "D31",
    ["bip"] = "D311",--originally placed in D32
    ["kkq"] = "D312",
    ["brf"] = "D32",
    ["nlj"] = "D33",
    ["vau"] = "D331",
    ["buu"] = "D332",
    ["ndk"] = "D333",
    ["zmw"] = "D334",
    ["bkf"] = "D335",
    ["jgb"] = "D336",
    ["nyj"] = "D43",
    ["bmb"] = "D54",
    ["byi"] = "D55",
    ["soz"] = "E46",
    ["ki"] = "E51",
    ["ebu"] = "E52",
    ["mer"] = "E53",
    ["mws"] = "E531",
    ["thk"] = "E54",
    ["cuh"] = "E541",
    ["kam"] = "E55",
    ["dhs"] = "E56",
    ["ebu"] = "E52",
    ["rwk"] = "E621A",--real mess here, all of Chaga needs sorting out
    ["jmc"] = "E621B",
    ["old"] = "E622A",
    ["vun"] = "E622C",
    ["rof"] = "E623",
    ["hka"] = "E64",
    ["gwe"] = "E65",
    ["hka"] = "E64",
    ["hka"] = "E64",
    ["mlk"] = "E701",
    ["pkb"] = "E71A",
    ["poj"] = "E71B",
    ["nyf"] = "E72a",--some Mijikenda is missing here
    ["coh"] = "E72c",
    ["dug"] = "E72d",
    ["dig"] = "E73",
    ["seg"] = "E731",
    ["dav"] = "E74",
    ["tga"] = "E74b",--Maho 2009 uses E741, but this innovation has been rejected in the latest ed of TBL
    ["tny"] = "F11",
    ["bdp"] = "F12",
    ["suk"] = "F21",
    ["nym"] = "F22",
    ["kcz"] = "F22C",
    ["suw"] = "F23",
    ["kiv"] = "F24",
    ["wun"] = "F25",
    ["suk"] = "F21",
    ["nim"] = "F31",
    ["isn"] = "F31B",
    ["rim"] = "F32",
    ["lag"] = "F33",
    ["mgz"] = "F34",
    ["suk"] = "F31",
    ["gog"] = "G11",
    ["kki"] = "G12",
    ["tvs"] = "G21",--Maho 2009 put this as E74a by mistake
    ["asa"] = "G22",
    ["mhd"] = "G221",
    ["ksb"] = "G23",
    ["bou"] = "G24",
    ["doe"] = "G301",
    ["ziw"] = "G31",
    ["cwe"] = "G32",
    ["zaj"] = "G33",
    ["ngp"] = "G34",
    ["ruf"] = "G35",
    ["kcu"] = "G36",
    ["kdc"] = "G37",
    ["vid"] = "G38",
    ["sbm"] = "G39",
    ["ymk"] = "G402",
    ["wmw"] = "G403",
    ["ccl"] = "G40B",--merge into sw?
    ["bnt-cmw"] = "G412",
    ["sw"] = "G42",--Bajuni might be worth splitting off; Kisetla isn't
    ["zdj"] = "G44a",
    ["wni"] = "G44b",
    ["wlc"] = "G44C",
    ["swb"] = "G44D",
    ["poy"] = "G51",
    ["ndj"] = "G52",
    ["sbp"] = "G61",
    ["heh"] = "G62",
    ["bez"] = "G63",
    ["pbr"] = "G64",
    ["zga"] = "G65",
    ["gmx"] = "G651",
    ["wbi"] = "G66",
    ["kiz"] = "G67",
    ["ktu"] = "H10A",
    ["mkw"] = "H10B",
    ["beq"] = "H11",
    ["xku"] = "H112A",
    ["dde"] = "H112B",
    ["vif"] = "H12",
    ["njx"] = "H13",
    ["sdj"] = "H131",
    ["kg"] = "H16",
    ["kwy"] = "H16a",
    ["yom"] = "H16c",
    ["ldi"] = "H16f",--H16 should be treated more consistently
    ["pnd"] = "H20",--not given a code, but seems to be distinct
    ["kmb"] = "H21",
    ["smd"] = "H22",
    ["blv"] = "H23",
    ["nsx"] = "H24",
    ["yaf"] = "H31",
    ["sub"] = "H32",
    ["shc"] = "H33",
    ["mxg"] = "H34",--add H35?
    ["mdp"] = "H41",
    ["hum"] = "H42",
    ["koo"] = "J41",--just using bare J codes, but we could change this
    ["nnb"] = "J42",
    ["nyg"] = "J501",--do not add J502
    ["hke"] = "J51",
    ["hav"] = "J52",
    ["shr"] = "J53",
    ["tbt"] = "J531",
    ["kcw"] = "J56",
    ["rw"] = "J61/62",
    ["flr"] = "J63",
    ["job"] = "J631",
    ["suj"] = "J64",
    ["han"] = "J65",
    ["haq"] = "J66",--we merged a couple of these into Rwanda-Rundi, but that should be reviewed
    ["vin"] = "J67",
    ["rub"] = "J101",
    ["tlj"] = "J102",
    ["ruc"] = "J103",
    ["nyo"] = "J11",
    ["ttj"] = "J12",
    ["nix"] = "J121",
    ["rub"] = "J101",
    ["nyn"] = "J13",
    ["cgg"] = "J14",--suggested merger of J13/14
    ["lg"] = "J15",
    ["xog"] = "J16",
    ["lke"] = "J16",--merge J16?
    ["gwr"] = "J17",
    ["xsj"] = "J20",--no code assigned
    ["now"] = "J21",
    ["hay"] = "J22",
    ["zin"] = "J23",
    ["ked"] = "J24",
    ["jit"] = "J25",
    ["kya"] = "J251",
    ["reg"] = "J252",--add Ruri J253?
    ["myx"] = "J31",
    ["bxk"] = "J31D",--merge into myx?
    ["lts"] = "J31E",
    ["luy"] = "J32",--if we have all the Luhya dialects covered, why do we have the macrolanguage?
    ["lwg"] = "J32a",
    ["lto"] = "J32b",
    ["lrm"] = "J32C",
    ["lks"] = "J32D",
    ["lkb"] = "J32E",
    ["nle"] = "J32F",
    ["nyd"] = "J33",
    ["lsm"] = "J34",
    ["lko"] = "J341",
    ["lri"] = "J342",
    ["nuj"] = "J35",
    ["ngq"] = "J401",
    ["ikz"] = "J402",
    ["sxb"] = "J403",
    ["ssc"] = "J403",--this shares a code with sxb, but it probably shouldn't
    ["szk"] = "J404",
    ["cwa"] = "J405",
    ["sgm"] = "J406",
    ["wre"] = "J407",
    ["rag"] = "J41",
    ["ida"] = "J411–413",--this isn't exactly pretty
    ["guz"] = "J42",
    ["kuj"] = "J43",
    ["zak"] = "J44",
    ["ntk"] = "J45",
    ["cjk"] = "K11",
    ["lum"] = "K12a",
    ["nba"] = "K12b",
    ["lch"] = "K13",
    ["lue"] = "K14",
    ["mck"] = "K15",
    ["nye"] = "K16",
    ["mfu"] = "K17",
    ["nkn"] = "K18",
    ["loz"] = "K21",
    ["lyn"] = "K31",
    ["mxo"] = "K32",
    ["kwn"] = "K33",
    ["diu"] = "K332",
    ["mhw"] = "K333",
    ["mho"] = "K34",
    ["sie"] = "K35",
    ["fwe"] = "K402",
    ["ttl"] = "K41",
    ["sbs"] = "K42",
    ["pem"] = "L11",
    ["smx"] = "L12a",
    ["hol"] = "L12b",
    ["kws"] = "L13",
    ["kcv"] = "L21",--add L22?
    ["lwa"] = "L221", 
    ["sop"] = "L23",
    ["bpj"] = "L231",
    ["luj"] = "L24",
    ["lua"] = "L31",
    ["kny"] = "L32",
    ["lu"] = "L33",
    ["hem"] = "L34",
    ["sng"] = "L35",
    ["kqn"] = "L41",
    ["slx"] = "L51",
    ["lun"] = "L52",
    ["rnd"] = "L53",
    ["nka"] = "L60",
    ["piw"] = "M11",
    ["rnw"] = "M12",
    ["fip"] = "M13",
    ["mgr"] = "M14/15",--split this?
    ["lai"] = "M201",
    ["wbh"] = "M21",
    ["mwn"] = "M22",
    ["nkt"] = "M23A",--nkv apparently already merged, but perhaps in error?
    ["nih"] = "M23",--B and C
    ["mgq"] = "M24",
    ["sbk"] = "M25",--add Iwa M26 and Tambo M27?
    ["ndh"] = "M301",
    ["nyy"] = "M31",
    ["bwc"] = "M401",
    ["auh"] = "M402",
    ["tap"] = "M41",
    ["bem"] = "M42",
    ["leb"] = "M51/52",
    ["lam"] = "M54",
    ["kdg"] = "M55",
    ["leh"] = "M61",
    ["sby"] = "M62",
    ["ilb"] = "M63",
    ["shq"] = "M631",
    ["toi"] = "M64",
    ["dov"] = "M64",--apparently same code
    ["dne"] = "N101",
    ["nxi"] = "N102",
    ["mgs"] = "N11",
    ["ngo"] = "N12",
    ["mgv"] = "N13",
    ["mpa"] = "N14",
    ["tog"] = "N15",
    ["tum"] = "N21",--N21d Tumbuka-Senga is allegedly an unrelated language
    ["ny"] = "N31",--N201 merged here
    ["nse"] = "N41",
    ["phm"] = "N41",--merge N41?
    ["kdn"] = "N42",
    ["nyu"] = "N43",
    ["seh"] = "N44",--N441 swk already merged here
    ["bwg"] = "N44",--originally N45; merge?
    ["ndg"] = "P11",
    ["rui"] = "P12",
    ["mgw"] = "P13",
    ["nnq"] = "P14",
    ["mgy"] = "P15",
    ["yao"] = "P21",
    ["mwe"] = "P22",
    ["kde"] = "P23",--njd P24 merged in
    ["mvw"] = "P23",--add P25?
    ["vmw"] = "P31",--used as a macrolanguage code, but this is properly the code for P31A Central Makhuwa
    ["mgh"] = "P31B",
    ["vmk"] = "P31C",
    ["kzn"] = "P31C",
    ["llb"] = "P31C",
    ["mny"] = "P31C",
    ["vmr"] = "P31C",
    ["tke"] = "P31C",
    ["xmc"] = "P31D",
    ["xsq"] = "P31F",--Makhuwa is a mess; should either be lumped or split, and splitting seems a lot easier, but requires new codes
    ["eko"] = "P311",
    ["nte"] = "P312",
    ["ngl"] = "P32",
    ["lon"] = "P331",--should be merged into P32
    ["chw"] = "P34",
    ["cwb"] = "P34",--merge P34?
    ["mhm"] = "P341",
    ["ndg"] = "P31C",
    ["olu"] = "R101",
    ["nql"] = "R101",--can't find any info on whether it's distinct
    ["umb"] = "R11",--add R102 Kwisi?
    ["ndq"] = "R12",
    ["nyk"] = "R13",
    ["khu"] = "R14",
    ["kj"] = "R21",
    ["lnb"] = "R214",
    ["ng"] = "R22",
    ["kwm"] = "R23",
    ["nne"] = "R24",
    ["hz"] = "R30",
    ["dhm"] = "R311",--merge into hz?
    ["yey"] = "R41",
    ["sn"] = "S10",--Plateau Shona dialects covered by sn
    ["dmx"] = "S10",--cannot find any data at all, and no specific code has been assigned
    ["ndc"] = "S15",
    ["kck"] = "S16A",
    ["nmq"] = "S16B",--merge into kck? Ehret & Kinsman 1981 think so
    ["ve"] = "S20",
    ["tn"] = "S31",
    ["xkv"] = "S311",
    ["nso"] = "S32",
    ["brl"] = "S32E",
    ["two"] = "S32F",--merge S32?
    ["st"] = "S33",
    ["bnt-phu"] = "S404",--add Bhaca S402
    ["bnt-lal"] = "S406",
    ["nr"] = "S407",
    ["fng"] = "S40A",
    ["cmt"] = "S40B",
    ["xh"] = "S41",
    ["zu"] = "S42",
    ["ss"] = "S43",
    ["nd"] = "S44",
    ["tsc"] = "S51",
    ["ts"] = "S53",
    ["rng"] = "S54",
    ["cce"] = "S61",
    ["toh"] = "S62"
}

function iso2guthrie(iso)
        return codes[iso]
end

function export.iso2guthrie(frame)
    local args = frame:getParent().args
    local isocode = args[1] or error("Parameter 1 is required.")
    return iso2guthrie(isocode)
end

export.codes = codes

return export