Module:Auphen/sandbox/doc
This is the documentation page for Module:Auphen/sandbox
This is the documentation for Module:Auphen/sandbox, a working copy of Module:Auphen, the sound-change engine of the Yezur wiki. It is a test rig rather than a live component: no article, dictionary entry or template renders through it, and it should not be relied on. It holds whatever candidate engine was last placed here, which may be ahead of the live module, behind it, or at odds with it.
An engine change is drafted on this page, run beside the live version over the languages it touches, and only then copied to Module:Auphen. The candidate placed here on 2026-08-26 — category-wide numbering of @ instances, and backtracking in local context matching — was promoted the same day. The two pages are not kept in step automatically, so compare their histories before treating this one as current.
Invocation
The sandbox is not called from wikitext directly: it returns a plain Lua table with no frame-taking functions. Module:Auphen/sandbox/frame is a copy of Module:Auphen/frame whose require points here, and it carries the same auphen and raw entry points, so the same call can be put to the candidate and to the live engine and the two outputs compared:
{{#invoke:Auphen/sandbox/frame|raw|word|YAQ-HE}}{{#invoke:Auphen/frame|raw|word|YAQ-HE}}
Sound data is shared, not copied: the sandbox frame loads the same per-language pages (Module:Auphen/YAQ-HE and its siblings) as the live frame, so the engine is the only difference between the two results. Cases that have been accepted belong on Template:Auphen/testcases, which calls the live frame.
Interface
The Lua interface is that of the live module.
| Name | Purpose |
|---|---|
Auphen.new(categories, ipa_rules, opts) |
Builds an engine. categories maps bracketed names such as [C] to their members in declaration order; ipa_rules is the spelling-to-sound text, one spelling/sound pair to a line; opts is optional.
|
eng:run(ruleset, input, toIpa) |
Runs ruleset over input and returns the result. With toIpa set, the input is lower-cased, its punctuation normalised and ipa_rules applied first. Spaces and ~ divide the input into words, each derived with its own word edges.
|
eng:run_word(ruleset, word) |
Runs the ruleset over a single word; the result takes the capitalisation of the input — all lower case, all upper case, or an initial capital. Returns the derived word and a trace giving, for each rule line, the rule, the output after it and whether it fired. |
eng.warnings |
The warnings raised while loading categories and while expanding and resolving rules. |
opts.explodeCap |
The ceiling on the number of alternatives a rule segment's categories may expand to, 5,000,000 by default. A segment above it is dropped with a warning, so the rule matches nothing. |
opts.dashToSpace |
When set, every - left in the finished word is rendered as a space.
|
Neither option is set by the two frames, so calls made from wikitext run at the defaults. The rule notation the engine reads is summarised in the header comment of the module itself. Design notes, the behaviour log and the record of divergences are on Module talk:Auphen and are not repeated here.