24 tests failed.
test_phonemic
|
Text |
Expected |
Actual
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
ordu
|
[oɾˈdu]
|
[oɾdu]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
gâvur
|
[ɟaˈvuɾ]
|
[ɟaːvuɾ]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
düğün
|
[dyˈɰyn]
|
[dyɰyn]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
benim
|
[beˈnim]
|
[benim]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
benim
|
[ˈbe.nim]
|
[benim]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
Türkçe
|
[ˈtyɾk.t͡ʃe]
|
[tyɾkt͡ʃe]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
nerede
|
[ˈne.ɾe.de]
|
[neɾede]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
sükûnet
|
[sy.cuːˈnet]
|
[sycuːnet]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
iktisâden
|
[ic.tiˈsaː.den]
|
[ictisaːden]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
kendi
|
[cenˈdi]
|
[cendi]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
seviyorum
|
[se.viˈjo.ɾum]
|
[sevijoɾum]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
Vaşington
|
[vaˈʃink.ton]
|
[vaʃinkton]
|
test_phonetic
|
Text |
Expected |
Actual
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
ordu
|
[o̞ɾˈd̪ʊ]
|
[o̞rd̪ʊ]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
gâvur
|
[ɟɑˈβ̞uɾ̞̊]
|
[gâβur]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
düğün
|
[d̪yˈɰ̟yn̪]
|
[d̪üːn̪]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
benim
|
[be̞ˈn̪im]
|
[bæn̪im]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
benim
|
[ˈbe̞.n̪im]
|
[bæn̪im]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
Türkçe
|
[ˈt̪ʰyɾ̞̊k.t͡ʃɛ]
|
[Türkçɛ]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
nerede
|
[ˈn̪e̞.ɾe̞.d̪ɛ]
|
[n̪e̞re̞d̪ɛ]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
sükûnet
|
[s̪y.cʰuːˈn̪e̞t̪]
|
[s̪ükûn̪e̞t̪]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
iktisâden
|
[ic.t̪ʰiˈs̪ɑː.d̪æn̪]
|
[ikt̪is̪âd̪æn̪]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
kendi
|
[cʰæn̪ˈd̪ɪ]
|
[kʰæn̪dɪ]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
seviyorum
|
[s̪e̞.viˈjo̞.ɾum]
|
[s̪e̞viyo̞rum]
|
- REDIRECT Template:Xmark
| This page is a redirect:
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.
When appropriate, protection levels are automatically sensed, described and categorized. |
|
Vaşington
|
[vɑˈʃiŋk.t̪ʰo̞n̪]
|
[Vɑşin̪gt̪o̞n̪]
|
test_sezer
|
Text |
Expected |
Actual
|
Y
|
Vaşington
|
vaşˈington
|
vaşˈington
|
Y
|
Ankara
|
ˈankara
|
ˈankara
|
Y
|
Oregon
|
orˈegon
|
orˈegon
|
Y
|
Ordu
|
ˈordu
|
ˈordu
|
Y
|
Edirne
|
edˈirne
|
edˈirne
|
Usage
{{#invoke:User:AmazingJus/turkish|function_name}}
local export = {}
-- local m_IPA = require("Module:IPA")
local U = mw.ustring.char
local match = mw.ustring.match
local gsub = mw.ustring.gsub
local m_broad = require("Module:User:AmazingJus/turkish")
local ring = U(0x30A)
local tack = U(0x31E)
local plus = U(0x31F)
local minus = U(0x320)
local bridge = U(0x32A)
local breve = U(0x361)
-- we need to use the broad transcription first in order for this to work properly
function export.phonetic(text)
if type(text) == "table" then
text = text.args[1]
end
local b = "ɯuɑo"
local f = "iyeø"
local r = "yuøo"
local u = "ɯɑie"
local v = "yuøoɯɑie"
-- make all word borders have a space
text = " " .. text .. " "
-- consonants
text = gsub(text, "([^" .. v .. "])\.%1", "%1ː") -- also broken up syllables are okay as well
if match(text, "[" .. r .. "]") then
text = gsub(text, "f([" .. r .. "])", "ɸ%1")
text = gsub(text, "([" .. r .. "]ː?)([.ˈ]?)f", "%1%2v\/ɸ")
text = gsub(text, "([" .. v .. "]ː?)([.ˈ]?)v([" .. r .. "])", "%1%2β" .. tack .. "%3")
text = gsub(text, "([" .. r .. "]ː?)([.ˈ]?)v([" .. u .. "])", "%1%2v\/β" .. tack .. "%3")
text = gsub(text, "([^" .. r .. "]ː?)([.ˈ]?)v([" .. r .. "])", "%1%2β%3")
text = gsub(text, "([" .. r .. "]ː?)([.ˈ]?)v([^" .. v .. "])", "%1%2β%3")
end
text = gsub(text, "([.ˈ ][ptck])([^" .. breve .. "])", "%1ʰ%2")
if match(text, "[ɾɫl][.ˈ]?[fcktsʃph]") then
text = gsub(text, "[ɾɫl]", {["ɾ"] = "ɾ" .. tack .. ring, ["ɫ"] = "ɫ" .. bridge .. ring, ["l"] = "l" .. minus .. ring .. "ʲ"})
end
if match(text, "[ɾɫl] ") then
text = gsub(text, "[ɾɫl]", {["ɾ"] = "ɾ" .. tack .. ring, ["ɫ"] = "ɫ" .. bridge .. ring, ["l"] = "l" .. minus .. ring .. "ʲ"})
end
text = gsub(text, "n([.ˈ]?)([kɡ])", "ŋ%1%2")
text = gsub(text, "n([.ˈ]?)([cɟ])", "ɲ%1%2")
text = gsub(text, "([ntdszɫ])([^" .. bridge .. "])", "%1" .. bridge .. "%2")
text = gsub(text, "l([^" .. minus .. "])", "l" .. minus .. "ʲ%1")
text = gsub(text, "([" .. f .. "]ː?)([.ˈ]?)h", "%1%2ç")
text = gsub(text, "h ", "x ")
text = gsub(text, "([" .. f .. "]ː?)([.ˈ]?)ɰ([" .. f .. "])", "%1%2ɰ" .. plus .. "\/j%3")
text = gsub(text, "([" .. v .. "]?)ɰ ", "%1ː ")
text = gsub(text, "ɰ([^" .. plus .. "])", "%1")
text = gsub(text, " (ˈ?)ɾ([^" .. tack .. "])", " %1ɾ" .. tack .. "%2")
-- vowels
mw.logObject(text)
text = gsub(text, "([iyɯueø]) $", {["i"] = "ɪ", ["y"] = "ʏ", ["ɯ"] = "ɯ" .. tack, ["u"] = "ʊ", ["e"] = "ɛ", ["ø"] = "œ"}) -- only at the end of phrases
text = gsub(text, "e([mnlɾ])", "æ%1") -- put another parameter to that it can also be pronounced [e]
text = gsub(text, "a", "ɑ")
text = gsub(text, "([eoø])", "%1" .. tack)
-- alternatives
return mw.text.trim(text)
end
return export