local p =
-- Define categories
-- All sortkeys have been guessed. They may be changed by common sense-- or consensus at local cats =
-- Define aliases
-- All non-alphanumeric characters are already stripped, and the string is-- already set to lowercase, so additional aliases for those are no longer-- required.
cats["rsinuisance"] = cats["rsi0"]cats["rsinotable"] = cats["rsi1"]cats["rsiminor"] = cats["rsi2"]cats["rsimajor"] = cats["rsi3"]cats["rsicrippling"] = cats["rsi4"]cats["rsiextreme"] = cats["rsi5"]cats["rsinuisance"] = cats["rsi0"]cats["wssi0"] = cats["wssinone"]cats["wssi1"] = cats["wssilimited"]cats["wssi2"] = cats["wssiminor"]cats["wssi3"] = cats["wssimoderate"]cats["wssi4"] = cats["wssimajor"]cats["wssi5"] = cats["wssiextreme"]cats["sty"] = cats["supertyphoon"]cats["nwpsevere"] = cats["severe"]cats["strong"] = cats["severe"]cats["swiosts"] = cats["severe"]cats["sts"] = cats["severe"]cats["severets"] = cats["severe"]cats["ty"] = cats["typhoon"]cats["vstrtyphoon"] = cats["vstyphoon"]cats["vsty"] = cats["vstyphoon"]cats["vity"] = cats["vityphoon"]cats["td"] = cats["depression"]cats["ts"] = cats["storm"]cats["nwpstorm"] = cats["storm"]cats["d"] = cats["depression"]cats["overlanddepression"] = cats["overland"]cats["od"] = cats["overland"]cats["spdepression"] = cats["depression"]cats["shdepression"] = cats["depression"]cats["shemdepression"] = cats["depression"]cats["swiodepression"] = cats["depression"]cats["spdepression"] = cats["depression"]cats["nwpdepression"] = cats["depression"]cats["swsubdep"] = cats["subdepression"]cats["sd"] = cats["subdepression"]cats["ss"] = cats["subtropical"]cats["et"] = cats["extratropical"]cats["ex"] = cats["extratropical"]cats["md"] = cats["monsoondepression"]cats["pt"] = cats["potential"]cats["potentialtropicalcyclone"] = cats["potential"]cats["potentialtropicalcyclone"] = cats["potential"]cats["post"] = cats["posttropical"]cats["remnantlow"] = cats["remnant"]cats["rl"] = cats["remnant"]cats["sucs"] = cats["sprcyclstorm"]cats["escs"] = cats["esvrcyclstorm"]cats["vscs"] = cats["vsvrcyclstorm"]cats["scs"] = cats["svrcyclstorm"]cats["cs"] = cats["niocyclone"]cats["dd"] = cats["deepdepression"]cats["cyclstorm"] = cats["niocyclone"]cats["landdepression"] = cats["nioland"]cats["land"] = cats["nioland"]cats["ld"] = cats["nioland"]cats["fiji5"] = cats["aus5"]cats["fiji4"] = cats["aus4"]cats["fiji3"] = cats["aus3"]cats["fiji2"] = cats["aus2"]cats["fiji1"] = cats["aus1"]cats["tl"] = cats["low"]cats["el"] = cats["extratropicallow"]cats["di"] = cats["disturbance"]cats["swiodisturbance"] = cats["disturbance"]cats["tdist"] = cats["disturbance"]cats["mts"] = cats["mstorm"]cats["sub"] = cats["mstorm"]cats["vitc"] = cats["vintense"]cats["itc"] = cats["intense"]cats["tc"] = cats["tropicalcyclone"]cats["swiotc"] = cats["tropicalcyclone"]cats["shem3"] = cats["tropicalcyclone"]cats["shemtc"] = cats["tropicalcyclone"]cats["f12"] = cats["beaufort12"]cats["f11"] = cats["beaufort11"]cats["f10"] = cats["beaufort10"]cats["f9"] = cats["beaufort9"]cats["f8"] = cats["beaufort8"]cats["f7"] = cats["beaufort7"]cats["f6"] = cats["beaufort6"]cats["f5"] = cats["beaufort5"]cats["f4"] = cats["beaufort4"]cats["f3"] = cats["beaufort3"]cats["f2"] = cats["beaufort2"]cats["f1"] = cats["beaufort1"]cats["f0"] = cats["beaufort0"]cats["d0"] = cats["drought0"]cats["d1"] = cats["drought1"]cats["d2"] = cats["drought2"]cats["d3"] = cats["drought3"]cats["d4"] = cats["drought4"]cats["p1"] = cats["palmer1"]cats["p2"] = cats["palmer2"]cats["p3"] = cats["palmer3"]cats["p4"] = cats["palmer4"]cats["p5"] = cats["palmer5"]cats["p6"] = cats["palmer6"]cats["p7"] = cats["palmer7"]cats["r1"] = cats["radio1"]cats["r2"] = cats["radio2"]cats["r3"] = cats["radio3"]cats["r4"] = cats["radio4"]cats["r5"] = cats["radio5"]cats["s1"] = cats["solar1"]cats["s2"] = cats["solar2"]cats["s3"] = cats["solar3"]cats["s4"] = cats["solar4"]cats["s5"] = cats["solar5"]cats["g1"] = cats["geo1"]cats["g2"] = cats["geo2"]cats["g3"] = cats["geo3"]cats["g4"] = cats["geo4"]cats["g5"] = cats["geo5"]cats["h1"] = cats["heat1"]cats["h2"] = cats["heat2"]cats["h3"] = cats["heat3"]cats["h4"] = cats["heat4"]cats["hw"] = cats["heatw"]cats["thunderstorm"] = cats["tstm"]cats["tstorm"] = cats["tstm"]cats["slightrisk"] = cats["slgtr"]cats["marginalrisk"] = cats["mrglr"]cats["moderaterisk"] = cats["mdtr"]cats["highrisk"] = cats["highr"]cats["enhancedrisk"] = cats["enhr"]cats["elevatedrisk"] = cats["elevatedr"]cats["extremerisk"] = cats["extremer"]cats["criticalrisk"] = cats["criticalr"]cats["redflag0"] = cats["redflagnil"]cats["redflag1"] = cats["redflagelv"]cats["redflag3"] = cats["redflagcrl"]cats["redflag5"] = cats["redflagcrh"]cats["redflag7"] = cats["redflagecr"]cats["redflag9"] = cats["redflaghcr"]cats["rfti0"] = cats["redflagnil"]cats["rfti1"] = cats["redflagelv"]cats["rfti3"] = cats["redflagcrl"]cats["rfti5"] = cats["redflagcrh"]cats["rfti7"] = cats["redflagecr"]cats["rfti9"] = cats["redflaghcr"]cats["torrou"] = cats["tu"]cats["torro0"] = cats["t0"]cats["torro1"] = cats["t1"]cats["torro2"] = cats["t2"]cats["torro3"] = cats["t3"]cats["torro4"] = cats["t4"]cats["torro5"] = cats["t5"]cats["torro6"] = cats["t6"]cats["torro7"] = cats["t7"]cats["torro8"] = cats["t8"]cats["torro9"] = cats["t9"]cats["torro10"] = cats["t10"]cats["torro11"] = cats["t11"]cats["funnelcloud"] = cats["fc"]cats["ice0"] = cats["spia0"]cats["ice1"] = cats["spia1"]cats["ice2"] = cats["spia2"]cats["ice3"] = cats["spia3"]cats["ice4"] = cats["spia4"]cats["ice5"] = cats["spia5"]
-- Key standardization checkfor k, v in pairs(cats) do if k ~= mw.ustring.gsub(k, "[^%w]", "") then mw.addWarning("Category \"" .. k .. "\" in is defined with a non-alphanumeric key. " .. "This key will likely be unusable unless non-alphanumeric characters are removed." ) endend
p.defaultCategory = "unknown"p.cats = catsreturn p