Module:IPAc2-mh: Difference between revisions

Content deleted Content added
Removed certain defunct experimental code.
Fixed epenthetic vowel height bug.
Line 418:
end
 
local function maxF1(a, b, c)
if bc then
return VOWEL[math.max(2, F1[a], F1[b], F1[c])][F2_FRONT]
elseif b then
return VOWEL[math.max(F1[a], F1[b])][F2_FRONT]
else
return VOWEL[math.max(2, F1FRONT_VOWEL[a])][F2_FRONT]
end
end
Line 439 ⟶ 441:
else
if isRalik then
return "hj"..maxF1(vowel, "E")..conson.._..conson..__..vowel
else
return conson..maxF1(vowel, "E").._..conson..__..vowel
end
end
Line 759 ⟶ 761:
-- Glides always trigger epenthesis, even neighboring other glides.
text = string.gsubstring_gsub2(text, "([aEei])( *h)(.)hw( *)hw", "%1%2hw(h)%1@%3Hw"3( *)([aEei])",
if not diphthongs then
function(vowelL, _, secondary, __, primaryR, ___, vowelR)
-- {ww} always causes the second glide to surface.
if secondary == "w" then
text = string.gsub(text, "([aEei])( *)hw( *)hw", "%1%2hw%1@%3Hw")
primaryR = "H"
end
end
return (
vowelL.._..secondary..
maxF1(vowelL, vowelR).."@"..
__..primaryR..secondary..___..vowelR
)
end
)
text = string.gsub(text, "([aEei])( *)hG( *.[jGw])", "%1%2hG%1@%3")
text = string.gsub(text, "(.[jGw])( *)hG( *)([aEei])", "%1%4@%2hG%3%4")
Line 809 ⟶ 819:
text = string_gsub2(text, "(.)( *..)v( *.. *)(.)",
function(vowelL, consonL, consonR, vowelR)
return vowelL..consonL..
maxF1(vowelL, vowelR, "E").."@"..
consonR..vowelR
end
)
Line 820 ⟶ 832:
text = string_gsub2(text, "([jGw])( *)/([aEei])(@? *.)%1",
function(secondary, _, vowel, infix)
return (
secondary.._..VOWEL[F1[vowel]][F2[secondary]]..
infix..secondary
)
end
)
Line 982 ⟶ 996:
text = string.gsub(text, "([jw])( *)/("..V..")( *)(.)([jGw])",
function(secondaryL, _, vowel, __, primaryR, secondaryR)
return (
secondaryL.._..
VOWEL_REFLEX["h"][primaryR]
[F2[secondaryL]][F2[secondaryR]][F1[vowel]]..
__..primaryR..secondaryR
)
end
)
Line 1,058 ⟶ 1,074:
"("..V..")( *.[jGw])(.)@( *.[jGw] *)("..V..")",
function(vowelL, infixL, vowel, infixR, vowelR)
return (
vowelL..infixL..
VOWEL[F1[maxF1(vowelL, vowelR, "E")]][F2[vowel]].."/@"..
infixR..vowelR
)
end
)
Line 1,083 ⟶ 1,101:
return (
vowelL..epenthL.._..
maxF1(vowelL, vowelR, "E").."^"..__..vowelR
)
else
return vowelL.._..epenthL..maxF1(vowelL, "E").."^"..__
end
else
if vowelR ~= "" then
return _..maxF1(vowelR, "E").."^"..__..vowelR
else
return _.."i^"..__