skillfed

panphon

Tools for using the International Phonetic Alphabet with phonological features

panphon v0.22.2 161.7K downloads/30d#10,623 on PyPI322
Permissive license MIT AGING released

What it is and what it does

PanPhon is a phonological database and Python library that encodes the relationship between IPA (International Phonetic Alphabet) segments and their articulatory feature representations. It provides a FeatureTable class that lets you query phonetic properties of individual sounds or entire words, convert speech segments into numeric feature vectors, and compute distances between sounds based on their phonological features rather than simple string edit distance.

The package includes tools for pattern matching on feature sets, sonority calculations, and multiple distance metrics (Levenshtein, feature-based edit distance, and Dolgopolsky equivalence classes). It depends on numpy, pandas, regex, editdistance, and munkres for its core operations. The library is designed for linguists, speech researchers, and NLP practitioners who need to work with phonetic data programmatically.

Use it for:

  • Compute phonological similarity between IPA transcriptions for speech recognition or dialect comparison tasks
  • Convert phonetic words into numeric feature matrices for machine learning on phonological data
  • Validate and analyze IPA text for well-formedness and articulatory properties in linguistic research
  • Build phonetic pattern matchers that operate on feature sets rather than exact character matches
  • Calculate sonority scores and feature-based edit distances for phonological rule application

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PanPhon maps International Phonetic Alphabet (IPA) segments to articulatory phonological feature vectors, enabling programmatic analysis of phonetic and phonological properties of speech sounds.

Yes, if you work with IPA data or phonological features in research or NLP. The package is stable, has no known vulnerabilities, and offers a well-established API backed by academic research. The aging status (428 days since release) is a minor concern but not a blocker—the library is mature and the recent commit activity suggests maintenance. Install it for phonetic feature analysis; don't expect rapid feature development.

Install

panphon on PyPI

pip

pip install panphon

uv

uv add panphon

poetry

poetry add panphon

Installing panphon

Before you install

Low install friction with a pure-Python wheel and eight runtime dependencies including standard data-science libraries (numpy, pandas) and text processing tools (regex, editdistance). Last commit was 2025-10-22 but the package is aging—428 days since the last release.

License in practice

MIT license is permissive; you can use, modify, and distribute PanPhon with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

import panphon
ft = panphon.FeatureTable()
segments = ft.word_fts(u'swit')
feature_array = ft.word_array(['syl', 'son', 'cont'], u'sɑlti')

Verify before relying

  • Whether the 428-day gap since last release indicates active maintenance or dormancy despite recent commits
  • Performance characteristics when processing large IPA corpora or real-time phonetic analysis
  • Completeness of IPA segment coverage and accuracy of articulatory feature mappings

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 8 — setuptools, unicodecsv, PyYAML, regex, numpy, editdistance, munkres, pandas
Maintenance aging — 428 days since the last release
Last repo commit
First released
Downloads 161,708/month — #10,623 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: panphon-0.22.2-py2.py3-none-any.whl

Operating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Linguistic

Tags

IPA phonetic featuresarticulatory feature vectorsphonological segment analysisIPA to features mappingphonetic distance metricslinguistic phoneme classification
phoneticslinguisticsipa

More Python Modules packages