<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://yezur.xyz/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AAuphen%2Fframe%2Fdoc</id>
	<title>Module:Auphen/frame/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://yezur.xyz/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AAuphen%2Fframe%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://yezur.xyz/w/index.php?title=Module:Auphen/frame/doc&amp;action=history"/>
	<updated>2026-08-28T16:49:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://yezur.xyz/w/index.php?title=Module:Auphen/frame/doc&amp;diff=13119&amp;oldid=prev</id>
		<title>Thiorosan: Create the documentation subpage</title>
		<link rel="alternate" type="text/html" href="https://yezur.xyz/w/index.php?title=Module:Auphen/frame/doc&amp;diff=13119&amp;oldid=prev"/>
		<updated>2026-08-27T12:19:43Z</updated>

		<summary type="html">&lt;p&gt;Create the documentation subpage&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is the documentation for [[Module:Auphen/frame]], the template-facing wrapper around [[Module:Auphen]] for the Yezur wiki. It is not normally invoked by hand: [[Template:Auphen]] calls it as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Auphen/frame|auphen|{{{1|}}}|{{{2|}}}|{{{3|}}}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, so that &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{auphen|word|code}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; estimates a pronunciation and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{auphen|word|code|ruleset}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; runs a named derivation ruleset. The wrapper holds no linguistic data of its own; it loads the per-language sound data page for the code given, builds an engine from it, runs the requested ruleset and formats the result.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Both entry points take the same three positional parameters, each trimmed of surrounding whitespace.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; || The word, in the language&amp;#039;s own orthography. Required.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; || The language registry code, e.g. &amp;lt;code&amp;gt;YBS-PJ&amp;lt;/code&amp;gt; (see [[Module:Languages]]). Required. It is upper-cased and used to load the data page &amp;lt;code&amp;gt;Module:Auphen/&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;CODE&amp;#039;&amp;#039;, so &amp;lt;code&amp;gt;ybs-pj&amp;lt;/code&amp;gt; resolves as well.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; || The name of a ruleset in that data page&amp;#039;s &amp;lt;code&amp;gt;sets&amp;lt;/code&amp;gt; table, matched exactly, case included. Left empty or omitted, the module estimates pronunciation instead.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Entry points ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! Output&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;auphen&amp;lt;/code&amp;gt; || The formatted result: an estimate wrapped as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;IPA&amp;quot;&amp;gt;/…/&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, a ruleset result as plain text. On failure it emits a bold inline &amp;lt;code&amp;gt;Auphen:&amp;lt;/code&amp;gt; error message and files the calling page into [[:Category:Auphen errors]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;raw&amp;lt;/code&amp;gt; || The engine&amp;#039;s bare output, without slashes, markup or categorisation; on failure the plain text &amp;lt;code&amp;gt;ERROR: &amp;lt;/code&amp;gt;&amp;#039;&amp;#039;message&amp;#039;&amp;#039;, again uncategorised. Used by [[Template:Auphen/testcases]] to compare output against hand-checked expectations, and by any caller that wants the segments alone.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Behaviour ==&lt;br /&gt;
&lt;br /&gt;
The two modes read different halves of the data page. Without a ruleset the engine is built from &amp;lt;code&amp;gt;ipacats&amp;lt;/code&amp;gt; (falling back to &amp;lt;code&amp;gt;cats&amp;lt;/code&amp;gt;) together with &amp;lt;code&amp;gt;ipa_rules&amp;lt;/code&amp;gt;, and the &amp;lt;code&amp;gt;pronounce&amp;lt;/code&amp;gt; ruleset is run in the engine&amp;#039;s sound mode: the word is lower-cased and converted through &amp;lt;code&amp;gt;ipa_rules&amp;lt;/code&amp;gt; from spelling to sound before the rules apply, so the result is in sounds. A data page carrying no &amp;lt;code&amp;gt;pronounce&amp;lt;/code&amp;gt; is not an error; an empty ruleset is run, leaving the output of &amp;lt;code&amp;gt;ipa_rules&amp;lt;/code&amp;gt; alone. With a ruleset the engine is built from &amp;lt;code&amp;gt;cats&amp;lt;/code&amp;gt; (falling back to &amp;lt;code&amp;gt;ipacats&amp;lt;/code&amp;gt;) and no &amp;lt;code&amp;gt;ipa_rules&amp;lt;/code&amp;gt;, and the named ruleset is run on the word as written, so the result stays in the orthography.&lt;br /&gt;
&lt;br /&gt;
Data pages are pulled in with &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;mw.loadData&amp;lt;/code&amp;gt;, because the read-only proxy &amp;lt;code&amp;gt;mw.loadData&amp;lt;/code&amp;gt; returns does not enumerate nested tables under &amp;lt;code&amp;gt;pairs()&amp;lt;/code&amp;gt; in Lua 5.1, which would hide the category members. Each category is copied into a plain table before it is handed to the engine.&lt;br /&gt;
&lt;br /&gt;
Four conditions produce an error: an empty word, an empty code, a code whose &amp;lt;code&amp;gt;Module:Auphen/&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;CODE&amp;#039;&amp;#039; page is missing or does not return a table, and a ruleset name absent from that page&amp;#039;s &amp;lt;code&amp;gt;sets&amp;lt;/code&amp;gt;. The word itself is passed through untouched, so a &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; word split is resolved by the engine, not here. The engine&amp;#039;s rule syntax, design notes and divergence log live on [[Module talk:Auphen]]; [[Module:Auphen/sandbox/frame]] is the same wrapper pointed at [[Module:Auphen/sandbox]], for testing a candidate engine side by side with the live one.&lt;/div&gt;</summary>
		<author><name>Thiorosan</name></author>
	</entry>
</feed>