Module:pine-pron: Difference between revisions

No edit summary
No edit summary
Line 11: Line 11:
local c = require("Module:languages/data").chars
local c = require("Module:languages/data").chars
local m_IPA = require("Module:IPA")
local m_IPA = require("Module:IPA")
local laxen = {
["y"] = "ʏ", ["i"] = "ɪ", ["ů"] = "œ", ["e"] = "ɛ",
["u"] = "ʊ", ["o"] = "ɔ", ["a"] = "ɑ",
}


local long_vowels = {
local long_vowels = {
["ả"] = "æː", ["ẻ"] = "eː", ["ỉ"] = "iː",
["ả"] = "æː", ["ẻ"] = "eː", ["ỉ"] = "iː",
["ỏ"] = "oː", ["ủ"] = "uː", ["ỷ"] = "yː",
["ỏ"] = "oː", ["ủ"] = "uː", ["ỷ"] = "yː",
}
local laxen = {
["y"] = "ʏ", ["i"] = "ɪ", ["ů"] = "œ", ["e"] = "ɛ",
["u"] = "ʊ", ["o"] = "ɔ", ["a"] = "ɑ",
}
}


Line 26: Line 26:
function export.crux(term)
function export.crux(term)
-- default to short lax vowels
-- default to short lax vowels
term = term:gsub("[aeiouyů]", laxen)
--term = term:gsub("[aeiouyů]", laxen)
-- long vowels
-- long vowels
term = term:gsub("[ảẻỉỏủỷ]", long_vowels); term = term:gsub("[aeiou]" .. c.hook, long_vowels)
term = term:gsub("[ảẻỉỏủỷ]", long_vowels)
term = term:gsub("ɔɑ", "ɑː"); term = term:gsub("ɛœ", "øː")
term = term:gsub("ɔɑ", "ɑː"); term = term:gsub("ɛœ", "øː")
-- diphthongized vowels
-- diphthongized vowels