Module:R:be:Verbum

Hello, you have come here looking for the meaning of the word Module:R:be:Verbum. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:R:be:Verbum, but we will also tell you about its etymology, its characteristics and you will know how to say Module:R:be:Verbum in singular and plural. Everything you need to know about the word Module:R:be:Verbum you have here. The definition of the word Module:R:be:Verbum will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:R:be:Verbum, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module implements the reference template {{R:be:Verbum}}.


-- This module is intended to support making references to https://verbum.by dictionaries

local export = {}

local subst_tbl = {
     =  "A",
     =  "a",
     =  "B",
     =  "b",
     =  "V",
     =  "v",
     =  "H",
     =  "h",
     =  "D",
     =  "d",
     =  "Zh",
     =  "zh",
     =  "Z",
     =  "z",
     =  "I",
     =  "i",
     =  "J",
     =  "j",
     =  "K",
     =  "k",
     =  "L",
     =  "l",
     =  "M",
     =  "m",
     =  "N",
     =  "n",
     =  "O",
     =  "o",
     =  "P",
     =  "p",
     =  "R",
     =  "r",
     =  "S",
     =  "s",
     =  "T",
     =  "t",
     =  "U",
     =  "u",
     =  "U",
     =  "u",
     =  "F",
     =  "f",
     =  "Ch",
     =  "ch",
     =  "C",
     =  "c",
     =  "Ch",
     =  "ch",
     =  "Sh",
     =  "sh",
     =  "",
     =  "",
     =  "",
     =  "Y",
     =  "y",
     =  "",
     =  "",
     =  "E",
     =  "e",
     =  "je",
     =  "jo",
     =  "ju",
     =  "ja",
     =  "Je",
     =  "Jo",
     =  "Ju",
     =  "Ja",
}

local subst_tbl_after_consonant = {
     =  "ie",
     =  "io",
     =  "iu",
     =  "ia",
     =  "ie",
     =  "io",
     =  "iu",
     =  "ia",
}

-- Lua implementation of https://github.com/verbumby/verbum/blob/master/backend/textutil/romanize_belarusian.go
function export.RomanizeBelarusian(frame)
	local params = {
		 = {required = true},
	}
    local args = require("Module:parameters").process(frame.args, params)
    local s = args
    s = mw.ustring.gsub(s, "'", "'")
    s = mw.ustring.gsub(s, "(?)()", function (prev, cur)
            if prev == "" then
                return cur
            else
                return prev .. subst_tbl_after_consonant
            end
        end)
    s = mw.ustring.gsub(s, ".", subst_tbl)
    return s
end

return export