local ncp = ncp
local modname = core.get_current_modname()

local dictionary = {
    "a akesi ala alasa ale anpa ante anu awen",
    "e en epiku esun",
    "ijo ike ilo insa",
    "jaki jan jasima jelo jo",
    "kala kalama kama kasi ken kepeken kijetesantakalu kili kin kipisi kiwen",
    "ko kokosila kon ku kule kulupu kute",
    "la lanpan lape laso lawa leko len lete li lili linja lipu loje lon luka lukin lupa",
    "ma mama mani meli meso mi mije misikeke moku moli monsi monsuta mu mun musi mute",
    "n namako nanpa nasa nasin nena ni nimi nimi_open nimi_pini noka",
    "o oko olin ona open",
    "pakala pali palisa pan pana pi pilin pimeja pini pipi po poka poki pona pu",
    "sama san seli selo seme sewi sijelo sike sike_lili sike_lili_tu",
    "sin sina sinpin sitelen soko sona soweli suli suno supa suwi",
    "tan taso tawa telo tenpo toki tomo tonsi tu",
    "unpa uta utala",
    "walo wan waso wawa weka wile",
}

for _, line in pairs(dictionary) do
    local page = {}
    for word in line:gmatch("%S+") do
        local glyph = {
            name = word,
            id = modname..":glyph_"..word,
            texture = modname.."_glyph_"..word..".png",
        }
        table.insert(page, glyph)
        ncp.writing.register(glyph)
    end
    table.insert(ncp.writing.pages, page)
end
