Module:MOS: Difference between revisions
Added variant function of as_string, which formats a mos string as "xL ys (p/q-equivalent)" |
Added a separate table of abbrevs |
||
| Line 5: | Line 5: | ||
local p = {} | local p = {} | ||
-- Table of official tamnams names (2/1-equave only) | |||
p.tamnams_name = { -- Only mosses with 2/1-equave names in TAMNAMS | p.tamnams_name = { -- Only mosses with 2/1-equave names in TAMNAMS | ||
['1L 1s'] = 'monowood', | ['1L 1s'] = 'monowood', | ||
| Line 45: | Line 45: | ||
['9L 1s'] = 'sinatonic' | ['9L 1s'] = 'sinatonic' | ||
} | } | ||
-- Prefixes | |||
p.tamnams_prefix = { -- Only mosses with 2/1-equave names in TAMNAMS | p.tamnams_prefix = { -- Only mosses with 2/1-equave names in TAMNAMS | ||
['1L 1s'] = 'monwd- (abbr. wood)', | ['1L 1s'] = 'monwd- (abbr. wood)', | ||
| Line 84: | Line 86: | ||
['9L 1s'] = 'sina- (abbr. si)' | ['9L 1s'] = 'sina- (abbr. si)' | ||
} | } | ||
-- Abbreviations (most abbrevs are the same as the prefixes but there are exceptions) | |||
p.tamnams_abbrev = { -- Only mosses with 2/1-equave names in TAMNAMS | |||
['1L 1s'] = 'wood', | |||
['2L 2s'] = 'bw', | |||
['1L 5s'] = 'amech', | |||
['2L 4s'] = 'mal', | |||
['3L 3s'] = 'trw', | |||
['4L 2s'] = 'cit', | |||
['5L 1s'] = 'mech', | |||
['1L 6s'] = 'on', | |||
['2L 5s'] = 'pel', | |||
['3L 4s'] = 'mosh', | |||
['4L 3s'] = 'smi', | |||
['5L 2s'] = 'dia', | |||
['6L 1s'] = 'arch', | |||
['1L 7s'] = 'apine', | |||
['2L 6s'] = 'subar', | |||
['3L 5s'] = 'chk', | |||
['4L 4s'] = 'ttw', | |||
['5L 3s'] = 'onei', | |||
['6L 2s'] = 'ek', | |||
['7L 1s'] = 'pine', | |||
['1L 8s'] = 'ablu', | |||
['2L 7s'] = 'bal', | |||
['3L 6s'] = 'ch', | |||
['4L 5s'] = 'gram', | |||
['5L 4s'] = 'cth', | |||
['6L 3s'] = 'hyru', | |||
['7L 2s'] = 'arm', | |||
['8L 1s'] = 'blu', | |||
['1L 9s'] = 'asi', | |||
['2L 8s'] = 'jar', | |||
['3L 7s'] = 'seph', | |||
['4L 6s'] = 'lime', | |||
['5L 5s'] = 'pw', | |||
['6L 4s'] = 'lem', | |||
['7L 3s'] = 'dico', | |||
['8L 2s'] = 'tar', | |||
['9L 1s'] = 'si' | |||
} | |||
function table_invert(t) | function table_invert(t) | ||
local s={} | local s={} | ||