Modul:User:Şêr/xwendin: Cudahiya di navbera guhartoyan de

Ji Wîkîpediya, ensîklopediya azad.
Content deleted Content added
Şêr (gotûbêj | beşdarî)
Kurteya guhartinê tine
Şêr (gotûbêj | beşdarî)
Kurteya guhartinê tine
Rêz 1: Rêz 1:
local export = {}
local export = {}
--local m_IPA = require("Module:IPA")

--local lang = require("Module:languages").getByCode("ku")


local letters1_phonemes = {
local letters1_phonemes = {
["a"] = "a",
["a"] = "a",
["b"] = "b",
["b"] = "b",
["c"] = "",
["c"] = "d͡ʒ",
["ç"] = "t͡ʃ",
["ç"] = "t͡ʃ",
["d"] = "d",
["d"] = "d",
Rêz 19: Rêz 22:
["m"] = "m",
["m"] = "m",
["n"] = "n",
["n"] = "n",
["o"] = "ɔ",
["o"] = "o",
["p"] = "p",
["p"] = "p",
["q"] = "q",
["q"] = "q",
Rêz 50: Rêz 53:
ipa = word
ipa = word
-- Add default stress mark if not present
if not mw.ustring.find(ipa, "ˈ") then
ipa = "ˈ" .. ipa
end
return ipa
return ipa
Rêz 65: Rêz 73:
end
end
end
for key, word in ipairs(words) do

words[key] = IPA_word(word)
return export
end
return export
end

Guhartoya 12:11, 10 kanûna pêşîn 2016

Belgekirina modulê[biafirîne]
local export = {}
--local m_IPA = require("Module:IPA")

--local lang = require("Module:languages").getByCode("ku")

local letters1_phonemes = {
	["a"] = "a",
    ["b"] = "b",
	["c"] = "d͡ʒ",
    ["ç"] = "t͡ʃ",
	["d"] = "d",
	["e"] = "ɛ",
	["ê"] = "eː",
	["f"] = "f",
	["g"] = "ɡ",
	["h"] = "h",
	["i"] = "ɯ",
	["î"] = "iː",
	["j"] = "ʒ",
	["k"] = "k",
	["l"] = "l",
	["m"] = "m",
	["n"] = "n",
	["o"] = "o",
	["p"] = "p",
	["q"] = "q",
	["r"] = "r",
	["s"] = "s",
	["ş"] = "ʃ",
	["t"] = "t",
	["u"] = "u",
	["û"] = "uː",
	["v"] = "v",
	["w"] = "w",
	["x"] = "χ",
	["y"] = "j",
	["z"] = "z"
}

letters3_phonemes= {
	["xwa"] = "χua",
	["xwe"] = "χuɛ",
	["xwê"] = "χueː",
	["xwî"] = "χuiː"
}

local function IPA_word(word)
	-- Make everything lowercase so we don't have to deal with case differences
	word = mw.ustring.lower(word)
	
	word = mw.ustring.gsub(word, '...', letters3_phonemes)
	word = mw.ustring.gsub(word, '.', letters1_phonemes)
	
	ipa = word
	
	-- Add default stress mark if not present
	if not mw.ustring.find(ipa, "ˈ") then
		ipa = "ˈ" .. ipa
	end
	
	return ipa
end

function export.IPA(frame)
	local words = {}
	
	for _, word in ipairs(frame:getParent().args) do
		table.insert(words, word)
	end
	
	if #words == 0 then
		words = {mw.title.getCurrentTitle().text}
	end
	
end

return export