Sound Change API

Free API AccessNo login requiredGET + POST

Sound Change API

Apply SCA²-style rules through a stateless REST endpoint. Requests may contain up to 10,000 entries.

Back to Sound Change Applier
Endpoints
GET /api/sound-changes?rules=p%2Ff%2F_&words=pata%0Apataka
POST /api/sound-changes
POST JSON
{
  "categories": "V=aeiou\nC=ptkbdg",
  "rewriteRules": "sh|š",
  "rules": "p/f/_\nt/d/#_",
  "words": ["pataka", "pata"],
  "rewriteOnOutput": false,
  "showIntermediate": false,
  "intermediateOnly": false,
  "outputFormat": "inputToOutput"
}
URL Parameters
rules

Required sound-change program.

words or lexicon

Required newline-separated entries.

categories or cats

Category definitions.

rewriteRules or rewrites

Preprocessing rewrite rules.

rewriteOnOutput

Use 1 or true to reverse rewrites.

showIntermediate

Use 1 or true to include -* stages.

intermediateOnly

Return only marked stages.

outputFormat or format

output, inputToOutput, or outputWithInput.

Response
{
  "outputs": [
    {
      "input": "pataka",
      "output": "pataka → fataka",
      "appliedRuleIndexes": [1]
    }
  ],
  "ruleErrors": []
}
Lineage and credit

The rule language follows Mark Rosenfelder's original SCA² Sound Change Applier. Mundifex is not affiliated with Zompist or Mark Rosenfelder; I am simply a huge fan.

The Mundifex engine is a JavaScript adaptation of Diachronr, a Ruby gem I released in 2017 so a Rails application could apply sound changes to thousands of words at once. Diachronr was a greenroom implementation of the original SCA² Sound Change Applier. This API continues that bulk-first use case with a 10,000-entry request limit.