localmake_auto_subtabler=require("Module:auto-subtable")localcontent=mw.title.new("Appendix:Ancient Greek endings"):getContent()localendings={}-- Find entries for endings marked by the syntax "; [[...]]".-- Store them in a table.foranchorincontent:gmatch("\n; %[%[([^%]]+)%]%]")doifanchor:find("[\128-\255]")thenforsuffixinanchor:gmatch("%-[^%s,]+")doendings[suffix]=trueendendendlocalshares_ending=make_auto_subtabler()-- The actual purpose of this data module:-- Check if each ending ends with the characters of any smaller endings, by-- snipping off progressively larger pieces of the ending and comparing them to-- all other endings.-- If so, store the ending in an array indexed by the shorter ending.-- For instance, -εσθαι ends with the characters of -αι and -σθαι.forendinginpairs(endings)dofori=1,mw.ustring.len(ending)-2do-- Ignore the first two characters because of the hyphen.localsub_ending="-"..mw.ustring.sub(ending,-i)ifendings[sub_ending]thentable.insert(shares_ending[sub_ending],ending)endendendshares_ending:un_auto_subtable()return{shares_ending=shares_ending}