skillfed

Metaphone

A Python implementation of the metaphone and double metaphone algorithms.

metaphone v0.6 272.7K downloads/30d#8,206 on PyPI85
Permissive license BSD DORMANT released

What it is and what it does

Metaphone is a Python implementation of two phonetic encoding algorithms: the original Metaphone and Double Metaphone. Both produce approximate phonetic codes for English words and names to handle pronunciation variation and misspellings. Double Metaphone can return both primary and secondary codes to account for ambiguous cases and surname variants. For example, "Smith" encodes to SM0 and XMT while "Schmidt" encodes to XMT and SMT, sharing a common code.

The package has no runtime dependencies and is straightforward to use—import the algorithm function and pass a string to get back encoded phonetic codes. It's designed for applications like name matching in databases, full-text search, and handling user input with spelling variations. The implementation accounts for irregularities in English of Slavic, Germanic, Celtic, Greek, French, Italian, Spanish, Chinese, and other origins.

Use it for:

  • Match user-entered names against a database by comparing their phonetic codes instead of exact strings
  • Improve search results by finding words that sound similar despite different spellings
  • Deduplicate records in a dataset where names may be misspelled or spelled phonetically
  • Build a full-text search system that tolerates pronunciation-based variations in queries
  • Handle names from multiple language origins with a single encoding approach

Worth the install?

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

Implements the Metaphone and Double Metaphone phonetic encoding algorithms to generate approximate phonetic codes for words and names, useful for fuzzy matching and handling misspellings.

Yes, if you need phonetic matching and can accept a dormant package. The algorithm is stable and well-tested, with no known vulnerabilities and permissive licensing. However, verify compatibility with your Python version first—requires_python is unspecified, and the last release was 2016-08-24. The high install friction and lack of recent maintenance are minor concerns for a mature, single-purpose library.

Install

metaphone on PyPI

pip

pip install metaphone

uv

uv add metaphone

poetry

poetry add metaphone

Installing Metaphone

Before you install

High install friction due to source-only distribution. Package is dormant—last release was 2016-08-24, with no commits since 2024-02-28. No runtime dependencies, but the age and inactivity suggest limited ongoing maintenance.

License in practice

BSD license is permissive, allowing commercial and private use with minimal restrictions. No licensing barrier to adoption.

Quickstart

from metaphone import doublemetaphone
result = doublemetaphone("architect")
print(result)  # (u"ARKTKT", u"")

requires_python is unspecified; verify compatibility with your Python version before installing

Verify before relying

  • Whether the package works correctly on modern Python versions (requires_python is unspecified)
  • Whether the source distribution builds without issues on current systems
  • Performance characteristics and scalability for large datasets

Package facts

License BSD (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 3,642 days since the last release
Last repo commit
First released
Downloads 272,666/month — #8,206 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: Metaphone-0.6.tar.gz

Tags

phonetic encodingfuzzy name matchingdouble metaphone algorithmmisspelling tolerancephonetic similarityname matchingphonetic code generation
phonetic-encodingname-matchingfuzzy-search

More Linguistic packages