<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://test.st34an.tech/index.php?action=history&amp;feed=atom&amp;title=Module%3ASyllables</id>
	<title>Module:Syllables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://test.st34an.tech/index.php?action=history&amp;feed=atom&amp;title=Module%3ASyllables"/>
	<link rel="alternate" type="text/html" href="https://test.st34an.tech/index.php?title=Module:Syllables&amp;action=history"/>
	<updated>2026-04-10T22:35:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://test.st34an.tech/index.php?title=Module:Syllables&amp;diff=313&amp;oldid=prev</id>
		<title>Jsrs701: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://test.st34an.tech/index.php?title=Module:Syllables&amp;diff=313&amp;oldid=prev"/>
		<updated>2026-04-10T07:29:39Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:29, 10 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key mediawikidb:diff:1.41:old-312:rev-313 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jsrs701</name></author>
	</entry>
	<entry>
		<id>https://test.st34an.tech/index.php?title=Module:Syllables&amp;diff=312&amp;oldid=prev</id>
		<title>bob&gt;Juelos: Text replacement - &quot;(\[\[)w:([^\|\]\[]+?)(\]\])&quot; to &quot;\1Wikipedia:\2|\2\3&quot;</title>
		<link rel="alternate" type="text/html" href="https://test.st34an.tech/index.php?title=Module:Syllables&amp;diff=312&amp;oldid=prev"/>
		<updated>2024-08-30T12:59:24Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;(\[\[)w:([^\|\]\[]+?)(\]\])&amp;quot; to &amp;quot;\1Wikipedia:\2|\2\3&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local export = {}&lt;br /&gt;
&lt;br /&gt;
local vowels = mw.loadData(&amp;quot;Module:IPA/data/symbols&amp;quot;).vowels .. &amp;quot;ᵻ&amp;quot; .. &amp;quot;ᵿ&amp;quot;&lt;br /&gt;
&lt;br /&gt;
local U = mw.ustring.char&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Add diphthongs to the list if they do not contain semivowel symbols: /j w ɰ ɥ/.&lt;br /&gt;
Do not include non-syllabic diacritics: /au/, not /au̯/.&lt;br /&gt;
The module automatically does not count vowels with non-syllabic diacritics.&lt;br /&gt;
]]--&lt;br /&gt;
local diphthongs = {&lt;br /&gt;
	[&amp;quot;de&amp;quot;] = {&lt;br /&gt;
		&amp;quot;a[ɪʊ]&amp;quot;,&lt;br /&gt;
		&amp;quot;ɔ[ʏɪ]&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	[&amp;quot;ca&amp;quot;] = {	-- Catalan has diphthongs, but they are generally transcribed using&lt;br /&gt;
				-- /w/ and /j/, so do not need to be listed (see [[Wikipedia:Catalan language#Diphthongs and triphthongs|Catalan language#Diphthongs and triphthongs]].&lt;br /&gt;
		},&lt;br /&gt;
	[&amp;quot;cs&amp;quot;] = { -- [[Wikipedia:Czech phonology#Diphthongs|Czech phonology#Diphthongs]]&lt;br /&gt;
		&amp;quot;[aeo]u&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	[&amp;quot;en&amp;quot;] = { -- from [[Appendix:English pronunciation]] mostly, but /ʌɪ/ is from the OED&lt;br /&gt;
		&amp;quot;[aɑeɛoɔʌ][ɪi]&amp;quot;,&lt;br /&gt;
		&amp;quot;[ɑɒæo]e&amp;quot;,&lt;br /&gt;
		&amp;quot;[əɐ]ʉ&amp;quot;,&lt;br /&gt;
		&amp;quot;[aɒəoɔʌ]ʊ&amp;quot;,&lt;br /&gt;
		&amp;quot;æo&amp;quot;,&lt;br /&gt;
		&amp;quot;[ɛeɪiɔʊʉ]ə&amp;quot;,	-- /iə/ is a diphthong in NZE, but a disyllabic sequence in GA.&lt;br /&gt;
						-- /ɪə/ is both a disyllabic sequence and a diphthong in old-fashioned RP.&lt;br /&gt;
		&amp;quot;[aʌ][ʊɪ]ə&amp;quot;,	-- May be a disyllabic sequence in some or all dialects?&lt;br /&gt;
		},&lt;br /&gt;
	[&amp;quot;fi&amp;quot;] = {			-- [[Wikipedia:Finnish phonology#Diphthongs|Finnish phonology#Diphthongs]]&lt;br /&gt;
		&amp;quot;[ɑeouyæø]i&amp;quot;,&lt;br /&gt;
		&amp;quot;[ɑoei]u&amp;quot;,&lt;br /&gt;
		&amp;quot;[eiæø]y&amp;quot;,&lt;br /&gt;
		&amp;quot;uo&amp;quot;,&lt;br /&gt;
		&amp;quot;ie&amp;quot;,&lt;br /&gt;
		&amp;quot;yø&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	[&amp;quot;fr&amp;quot;] = {			-- French has diphthongs, but they are transcribed&lt;br /&gt;
		},				-- with semivowel symbols: [[Wikipedia:French phonology#Glides and diphthongs|French phonology#Glides and diphthongs]].&lt;br /&gt;
	[&amp;quot;grc&amp;quot;] = {&lt;br /&gt;
		&amp;quot;[aeyo]i&amp;quot;,&lt;br /&gt;
		&amp;quot;[ae]u&amp;quot;,&lt;br /&gt;
		&amp;quot;[ɛɔa]ː[iu]&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	[&amp;quot;hval&amp;quot;] = {&lt;br /&gt;
		&amp;quot;[iu][aeo]ː*&amp;quot;,&lt;br /&gt;
		&amp;quot;aː*[eo]&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	[&amp;quot;is&amp;quot;] = {			-- [[Wikipedia:Icelandic phonology#Vowels|Icelandic phonology#Vowels]]&lt;br /&gt;
		&amp;quot;[aeø][iɪy]&amp;quot;,	-- Wikipedia is oddly specific about the second element: ei and ai, but øɪ.&lt;br /&gt;
		&amp;quot;[ao]u&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	[&amp;quot;it&amp;quot;] = {&lt;br /&gt;
		&amp;quot;[aeɛoɔu]i&amp;quot;,&lt;br /&gt;
		&amp;quot;[aeɛioɔ]u&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	[&amp;quot;la&amp;quot;] = {&lt;br /&gt;
		&amp;quot;[eaou]i&amp;quot;,&lt;br /&gt;
		&amp;quot;[eao]u&amp;quot;,&lt;br /&gt;
		&amp;quot;[ao]e&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	[&amp;quot;lb&amp;quot;] = {&lt;br /&gt;
		&amp;quot;[iu]ə&amp;quot;,&lt;br /&gt;
		&amp;quot;[ɜoæɑ]ɪ&amp;quot;,&lt;br /&gt;
		&amp;quot;[əæɑ]ʊ&amp;quot;,&lt;br /&gt;
	},&lt;br /&gt;
	[&amp;quot;sl&amp;quot;] = {			-- No diphthongs, properly speaking; sequences of a vowel, /j/ and /w/ though&lt;br /&gt;
	},&lt;br /&gt;
	[&amp;quot;sk&amp;quot;] = {			-- Slovak has rising diphthongs, /i̯e, i̯a, i̯u, u̯o/, which are probably always spelled with the nonsyllabic diacritic, so do not need to be listed.&lt;br /&gt;
	},&lt;br /&gt;
	[&amp;quot;ru&amp;quot;] = {			-- No diphthongs, properly speaking; sequences of a vowel and /j/ though.&lt;br /&gt;
	},&lt;br /&gt;
	[&amp;quot;sq&amp;quot;] = {			-- [[Wikipedia:Albanian language#Vowels|Albanian language#Vowels]] doesn&amp;#039;t mention anything about diphthongs.&lt;br /&gt;
	},&lt;br /&gt;
	[&amp;quot;ug&amp;quot;] = {			-- No diphthongs.&lt;br /&gt;
	},&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--[[ No use for this at the moment, though it is an interesting catalogue.&lt;br /&gt;
	It might be usable for phonetic transcriptions.&lt;br /&gt;
	Diacritics added to vowels:&lt;br /&gt;
	inverted breve above, inverted breve below,&lt;br /&gt;
	up tack, down tack,&lt;br /&gt;
	left tack, right tack,&lt;br /&gt;
	diaeresis (above), diaeresis below,&lt;br /&gt;
	right half ring, left half ring,&lt;br /&gt;
	plus sign below, minus sign below,&lt;br /&gt;
	combining x above, rhotic hook,&lt;br /&gt;
	tilde (above), tilde below&lt;br /&gt;
	ligature tie (combining double breve), ligature tie below&lt;br /&gt;
	]]&lt;br /&gt;
local diacritics = U(0x311)..U(0x32F)&lt;br /&gt;
	..U(0x31D)..U(0x31E)&lt;br /&gt;
	..U(0x318)..U(0x319)&lt;br /&gt;
	..U(0x308)..U(0x324)&lt;br /&gt;
	..U(0x339)..U(0x31C)&lt;br /&gt;
	..U(0x31F)..U(0x320)&lt;br /&gt;
	..U(0x33D)..U(0x2DE)&lt;br /&gt;
	..U(0x303)..U(0x330)&lt;br /&gt;
	..U(0x361)..U(0x35C)&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
combining acute and grave tone marks, circumflex&lt;br /&gt;
]]--&lt;br /&gt;
local tone = &amp;quot;[&amp;quot; .. U(0x341) .. U(0x340) ..U (0x302) .. &amp;quot;]&amp;quot;&lt;br /&gt;
local nonsyllabicDiacritics = U(0x311) .. U(0x32F)&lt;br /&gt;
local syllabicDiacritics = U(0x0329) .. U(0x030D)&lt;br /&gt;
local ties = U(0x361) .. U(0x35C)&lt;br /&gt;
&lt;br /&gt;
-- long, half-long, extra short&lt;br /&gt;
local lengthDiacritics = U(0x2D0) .. U(0x2D1) .. U(0x306)&lt;br /&gt;
local vowel = &amp;quot;[&amp;quot; .. vowels .. &amp;quot;]&amp;quot; .. tone .. &amp;quot;?&amp;quot;&lt;br /&gt;
local tie = &amp;quot;[&amp;quot; .. ties .. &amp;quot;]&amp;quot;&lt;br /&gt;
local nonsyllabicDiacritic = &amp;quot;[&amp;quot; .. nonsyllabicDiacritics .. &amp;quot;]&amp;quot;&lt;br /&gt;
local syllabicDiacritic = &amp;quot;[&amp;quot; .. syllabicDiacritics .. &amp;quot;]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
local UTF8Char = &amp;quot;[\1-\127\194-\244][\128-\191]*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function export.getVowels(remainder, lang)&lt;br /&gt;
	if string.find(remainder, &amp;quot;^[%\[/]?%-&amp;quot;) or string.find(remainder, &amp;quot;%-[%\[/]?$&amp;quot;) then&lt;br /&gt;
		return nil&lt;br /&gt;
	end	-- If a hyphen is at the beginning or end of the transcription, do not count syllables.&lt;br /&gt;
	&lt;br /&gt;
	local count = 0&lt;br /&gt;
	local diphs = diphthongs[lang:getCode()] or {}&lt;br /&gt;
	&lt;br /&gt;
	remainder = mw.ustring.toNFD(remainder)&lt;br /&gt;
	remainder = string.gsub(remainder, &amp;quot;%((.*)%)&amp;quot;, &amp;quot;%1&amp;quot;) -- Remove parentheses.&lt;br /&gt;
&lt;br /&gt;
	while remainder ~= &amp;quot;&amp;quot; do&lt;br /&gt;
		-- Ignore nonsyllabic vowels&lt;br /&gt;
		remainder = mw.ustring.gsub(remainder, &amp;quot;^&amp;quot; .. vowel .. nonsyllabicDiacritic, &amp;quot;&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
		local m =&lt;br /&gt;
			mw.ustring.match(remainder, &amp;quot;^.&amp;quot; .. syllabicDiacritic) or  -- Syllabic consonant&lt;br /&gt;
			mw.ustring.match(remainder, &amp;quot;^&amp;quot; .. vowel .. tie .. vowel)  -- Tie bar&lt;br /&gt;
		&lt;br /&gt;
		-- Starts with a recognised diphthong?&lt;br /&gt;
		for _, diph in ipairs(diphs) do&lt;br /&gt;
			if m then&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			m = m or mw.ustring.match(remainder, &amp;quot;^&amp;quot; .. diph)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		-- If we haven&amp;#039;t found anything yet, just match on a single vowel&lt;br /&gt;
		m = m or mw.ustring.match(remainder, &amp;quot;^&amp;quot; .. vowel)&lt;br /&gt;
		&lt;br /&gt;
		if m then&lt;br /&gt;
			-- Found a vowel, add it&lt;br /&gt;
			count = count + 1&lt;br /&gt;
			remainder = string.sub(remainder, #m + 1)&lt;br /&gt;
		else&lt;br /&gt;
			-- Found a non-vowel, skip it&lt;br /&gt;
			remainder = string.gsub(remainder, &amp;quot;^&amp;quot; .. UTF8Char, &amp;quot;&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if count ~= 0 then return count end&lt;br /&gt;
	&lt;br /&gt;
	return nil&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function export.countVowels2Test(frame)&lt;br /&gt;
	local params = {&lt;br /&gt;
		[1] = {required = true},&lt;br /&gt;
		[2] = {default = &amp;quot;&amp;quot;},&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	local args = require(&amp;quot;Module:parameters&amp;quot;).process(frame.args, params)&lt;br /&gt;
	&lt;br /&gt;
	local lang = require(&amp;quot;Module:languages&amp;quot;).getByCode(args[1]) or require(&amp;quot;Module:languages&amp;quot;).err(args[1], 1)&lt;br /&gt;
	&lt;br /&gt;
	local count = export.getVowels(args[2], lang)&lt;br /&gt;
	&lt;br /&gt;
	return &amp;#039;The text &amp;quot;&amp;#039; .. args[2] .. &amp;#039;&amp;quot; contains &amp;#039; .. count .. &amp;#039; vowels.&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local function countVowels(text)&lt;br /&gt;
	text = mw.ustring.toNFD(text) or error(&amp;quot;Invalid UTF-8&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	local _, count = mw.ustring.gsub(text, vowel, &amp;quot;&amp;quot;)&lt;br /&gt;
	local _, sequenceCount = mw.ustring.gsub(text, vowel..&amp;quot;+&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	local _, nonsyllabicCount = mw.ustring.gsub(text, vowel .. nonsyllabicDiacritic, &amp;quot;&amp;quot;)&lt;br /&gt;
	local _, tieCount = mw.ustring.gsub(text, vowel .. tie .. vowel, &amp;quot;&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	local diphthongCount = count - (nonsyllabicCount + tieCount)&lt;br /&gt;
	&lt;br /&gt;
	return count, sequenceCount, diphthongCount&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local function countDiphthongs(text, lang)&lt;br /&gt;
	text = mw.ustring.toNFD(text) or error(&amp;quot;Invalid UTF-8&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	local diphthongs = diphthongs[lang:getCode()] or {}&lt;br /&gt;
	&lt;br /&gt;
	local _, count&lt;br /&gt;
	local total = 0&lt;br /&gt;
	&lt;br /&gt;
	if diphthongs then&lt;br /&gt;
		for i, diphthong in pairs(diphthongs) do&lt;br /&gt;
			_, count = mw.ustring.gsub(text, diphthong, &amp;quot;&amp;quot;)&lt;br /&gt;
			total = total + count&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return total&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Used by [[Module:IPA]]&lt;br /&gt;
function export.hasDiphthongs(lang)&lt;br /&gt;
	if  (diphthongs[lang:getCode()]) then&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function export.countVowels(frame)&lt;br /&gt;
	local params = {&lt;br /&gt;
		[1] = {default = &amp;quot;&amp;quot;},&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	local args = require(&amp;quot;Module:parameters&amp;quot;).process(frame.args, params)&lt;br /&gt;
	&lt;br /&gt;
	local count, sequenceCount, diphthongCount = countVowels(args[1])&lt;br /&gt;
	&lt;br /&gt;
	local outputs = {}&lt;br /&gt;
	table.insert(outputs, (count or &amp;#039;an unknown number of&amp;#039;) .. &amp;#039; vowels&amp;#039;)&lt;br /&gt;
	table.insert(outputs, (sequenceCount or &amp;#039;an unknown number of&amp;#039;) .. &amp;#039; vowel sequences&amp;#039;)&lt;br /&gt;
	table.insert(outputs, (diphthongCount or &amp;#039;an unknown number of&amp;#039;) .. &amp;#039; vowels or vowels and diphthongs&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	return &amp;#039;The text &amp;quot;&amp;#039; .. args[1] .. &amp;#039;&amp;quot; contains &amp;#039; .. mw.text.listToText(outputs) .. &amp;quot;.&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function export.countVowelsDiphthongs(frame)&lt;br /&gt;
	local params = {&lt;br /&gt;
		[1] = {required = true},&lt;br /&gt;
		[2] = {default = &amp;quot;&amp;quot;},&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	local args = require(&amp;quot;Module:parameters&amp;quot;).process(frame.args, params)&lt;br /&gt;
	&lt;br /&gt;
	local lang = require(&amp;quot;Module:languages&amp;quot;).getByCode(args[1]) or require(&amp;quot;Module:languages&amp;quot;).err(args[1], 1)&lt;br /&gt;
	&lt;br /&gt;
	local vowels = countVowels(args[2])&lt;br /&gt;
	local count = vowels - countDiphthongs(args[2], lang) or 0&lt;br /&gt;
	&lt;br /&gt;
	local out = &amp;#039;The text &amp;quot;&amp;#039; .. args[2] .. &amp;#039;&amp;quot; contains &amp;#039; .. (count or &amp;#039;an unknown number of&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	if count == 1 then&lt;br /&gt;
		out = out .. &amp;#039; vowel or diphthong.&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		out = out .. &amp;#039; vowels or diphthongs.&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return out&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return export&lt;/div&gt;</summary>
		<author><name>bob&gt;Juelos</name></author>
	</entry>
</feed>