Skip to main content

Library for dealing with sound changes

Project description


Build Status codecov

alteruphono is a Python library for applying sound changes to phonetic and phonological representations, intended for use in simulations of language evolution.

Please remember that alteruphono is a work-in-progress.


In any standard Python environment, alteruphono can be installed with:

pip install alteruphono

The pip installation with also fetch dependencies, such as pyclts, if necessary. Installation in virtual environments is recommended.

How to use

Sound sequences are to be given in common CLDF/LingPy notation, i.e., as a single string with single space-separated graphemes. The library supports different transcription systems, defaulting BIPA as defined in pyclts.

Sound changes are defined by simplified regular expressions. Check the resources/sounds_changes.tsv for an example.

A basic usage, drawing a random sound change from the default collection and applying it, is:

import alteruphono

rules = alteruphono.utils.read_sound_changes()
random_rules = [alteruphono.utils.random_change(rules) for r in range(3)]
for rule in random_rules:
    source = rule["source"]
    target = rule["target"]
    test_case = rule["test"].split("/")[0].strip()

    print("%s -> %s" % (source, target))
    print("  [%s] [%s]" % (test_case, alteruphono.apply_rule(test_case, source, target)))


V N C -> @1[+nasalized] @3
  [a b ts a r i m b s u] [a b ts a r ĩ b s u]
e i -> a i
  [d i a z e i l e n] [d i a z a i l e n]
n k|g -> ŋ @2
  [a k a n k m i k s] [a k a ŋ k m i k s]


  • Use logging everywhere
  • Implement automatic, semi-automatic, and requested syllabification based on prosody strength
  • Implement both PEG grammars from separate repository
  • Add support for custom replacement functions (deciding on notation)

How to cite

If you use alteruphono, please cite it as:

Tresoldi, Tiago (2019). Alteruphono, a tool for simulating sound changes. Version 0.0.1dev. Jena. Available at:

In BibTex:

  author = {Tresoldi, Tiago},
  title = {Alteruphono, a tool for simulating sound changes},
  howpublished = {\url{}},
  address = {Jena},
  year = {2019},


Tiago Tresoldi (

The author was supported during development by the ERC Grant #715618 for the project CALC (Computer-Assisted Language Comparison: Reconciling Computational and Classical Approaches in Historical Linguistics), led by Johann-Mattis List.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for alteruphono, version 0.0.1.dev0
Filename, size File type Python version Upload date Hashes
Filename, size alteruphono-0.0.1.dev0-py3-none-any.whl (22.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size alteruphono-0.0.1.dev0.tar.gz (22.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page