metaphone
A Python implementation of the Metaphone and Double Metaphone algorithms
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 16 committers (6.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.4%) to scientific vocabulary
Last synced: 11 months ago
·
JSON representation
Repository
A Python implementation of the Metaphone and Double Metaphone algorithms
Basic Info
Statistics
- Stars: 82
- Watchers: 4
- Forks: 14
- Open Issues: 1
- Releases: 0
Fork of yasound/double-metaphone
Created about 14 years ago
· Last pushed over 2 years ago
Metadata Files
Readme
License
README.rst
~~~~~~~~~
Metaphone
~~~~~~~~~
.. contents::
:depth: 2
:backlinks: top
:local:
About
=====
*A Python implementation of the Metaphone and Double Metaphone algorithms*
Metaphone
---------
As described on the `Wikipedia page`_, the original Metaphone algorithm was
published in 1990 as an improvement over the `Soundex`_ algorithm. Like
Soundex, it was limited to English-only use. The Metaphone algorithm does not
produce phonetic representations of an input word or name; rather, the output
is an intentionally approximate phonetic representation. The approximate
encoding is necessary to account for the way speakers vary their pronunciations
and misspell or otherwise vary words and names they are trying to spell.
Double Metaphone
----------------
The Double Metaphone phonetic encoding algorithm is the second generation of
the Metaphone algorithm. Its implementation was described in the June 2000
issue of C/C++ Users Journal. It makes a number of fundamental design
improvements over the original Metaphone algorithm.
It is called "Double" because it can return both a primary and a secondary code
for a string; this accounts for some ambiguous cases as well as for multiple
variants of surnames with common ancestry. For example, encoding the name
"Smith" yields a primary code of SM0 and a secondary code of XMT, while the
name "Schmidt" yields a primary code of XMT and a secondary code of SMT--both
have XMT in common.
Double Metaphone tries to account for myriad irregularities in English of
Slavic, Germanic, Celtic, Greek, French, Italian, Spanish, Chinese, and other
origin. Thus it uses a much more complex ruleset for coding than its
predecessor; for example, it tests for approximately 100 different contexts of
the use of the letter C alone.
History
-------
This is a copy of the Python Double Metaphone algorithm, taken from `Andrew
Collins' work`_, a Python implementation of an algorithm in C originally
created by Lawrence Philips. Since then, improvements have been made by several
contributors, viewable in the git history.
A ``resources`` directory is included with this project which contains the
following:
* the original C++ file by Lawrence Philips
* Kevin Atkinson's improvements to it
* a C implementation (for use in a Perl extension) by Maurice Aubrey
The contributors of the Python version, originally started by Andrew Collins
include:
* Andrew Collins
* Chris Leong
* Matthew Somerville
* Richard Barran
* Maximillian Dornseif
* Sebastien Metrot
* Duncan McGreggor
* Ollie Bennett
* Ian Beaver
* Alastair Houghton
Usage
=====
Running the Unit Tests
----------------------
``metaphone`` uses the ``unittest`` package from the standard library, and as
such, its tests are runnable by most test runners. If you have `nose`_ installed,
you can do the following::
$ git clone https://github.com/oubiwann/metaphone.git
$ cd metaphone
$ nosetests -v .
If you have Twisted installed, you can do::
$ trial ./metaphone
Example Code
------------
The unit tests are full of examples, so be sure to check those out. But here's
a taste::
$ python
>>> from metaphone import doublemetaphone
>>> doublemetaphone("architect")
(u"ARKTKT", u"")
>>> doublemetaphone("bajador")
(u"PJTR", u"PHTR")
>>> doublemetaphone("Τι είναι το Unicode;")
(u'NKT', u'')
In the Wild
===========
The following developers/projects make use of this library:
* `Andrew Collins`_ used his original code in various music projects and
dealing with misspelled text from data provided by various web services. This
was then integrated with Plone/Zope projects.
* `Matthew Somerville`_ uses it on Theatricalia to do people name matching, and
it appears to work `quite well`_. The database stores the double metaphones
for first and last names, and then upon searching simply computes the double
metaphones of what has been entered and looks up anything that matches.
* `Duncan McGreggor`_ uses it on the `φarsk project`_ to provide greater full
text search capabilities for Indo-European language word lists and
dictionaries.
.. Links
.. _Wikipedia page: http://en.wikipedia.org/wiki/Metaphone#Double_Metaphone
.. _Soundex: http://en.wikipedia.org/wiki/Soundex
.. _Andrew Collins' work: http://www.atomodo.com/code/double-metaphone/metaphone.py/view
.. _Andrew Collins: http://www.atomodo.com/
.. _Matthew Somerville: https://github.com/dracos/
.. _Duncan McGreggor: https://github.com/oubiwann/
.. _quite well: http://theatricalia.com/search?q=chuck+iwugee
.. _φarsk project: https://github.com/oubiwann/tharsk
.. _nose: https://nose.readthedocs.org/
Owner
- Name: Duncan McGreggor
- Login: oubiwann
- Kind: user
- Location: [1, -i]
- Website: https://www.linkedin.com/in/oubiwann/
- Twitter: oubiwann
- Repositories: 137
- Profile: https://github.com/oubiwann
Hacking code across the solar system since '81.
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Duncan McGreggor | d****n@d****m | 61 |
| Matthew Somerville | m****w@d****k | 6 |
| Duncan McGreggor | d****r@u****v | 5 |
| Alastair Houghton | a****r@a****t | 3 |
| Lawrence Philips | l****s@v****m | 3 |
| Ollie Bennett | o****t@g****m | 3 |
| Kevin Atkinson | k****a@u****t | 2 |
| Leonard Kramer | l****r@y****m | 2 |
| Maximillian Dornseif | md@h****e | 2 |
| Michael Kuhn | m****n@r****p | 1 |
| Richard Barran | r****n@g****m | 1 |
| Ian Beaver | i****r@n****m | 1 |
| Maurice Aubrey | m****e@h****m | 1 |
| Duncan McGreggor | o****n@g****m | 1 |
| Sebastien Metrot | m****o@m****t | 1 |
| Thijs Mergaert | T****t@u****m | 1 |
Committer Domains (Top 20 + Academic)
meeloo.net: 1
hevanet.com: 1
nextit.com: 1
rhlab.uucp: 1
hudora.de: 1
yoti.com: 1
users.sourceforge.net: 1
verity.com: 1
alastairs-place.net: 1
usgs.gov: 1
dracos.co.uk: 1
dreamhost.com: 1
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 6
- Average time to close issues: N/A
- Average time to close pull requests: 2 months
- Total issue authors: 0
- Total pull request authors: 5
- Average comments per issue: 0
- Average comments per pull request: 0.33
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- al45tair (2)
- lkramer (1)
- lorepirri (1)
- oubiwann (1)
- olliebennett (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- pypi 204,897 last-month
- Total docker downloads: 37
-
Total dependent packages: 10
(may contain duplicates) -
Total dependent repositories: 37
(may contain duplicates) - Total versions: 4
- Total maintainers: 1
pypi.org: metaphone
A Python implementation of the metaphone and double metaphone algorithms.
- Homepage: https://github.com/oubiwann/metaphone
- Documentation: https://metaphone.readthedocs.io/
- License: BSD
-
Latest release: 0.6
published almost 10 years ago
Rankings
Downloads: 0.8%
Dependent packages count: 1.4%
Dependent repos count: 2.4%
Docker downloads count: 3.4%
Average: 4.2%
Stargazers count: 7.8%
Forks count: 9.3%
Maintainers (1)
Last synced:
11 months ago
conda-forge.org: metaphone
- Homepage: https://github.com/oubiwann/metaphone
- License: BSD 3-clause
-
Latest release: 0.6
published almost 4 years ago
Rankings
Dependent packages count: 15.6%
Average: 29.9%
Stargazers count: 32.8%
Dependent repos count: 34.0%
Forks count: 37.3%
Last synced:
11 months ago
conda-forge.org: metafone
- Homepage: https://github.com/oubiwann/metaphone
- License: BSD 3-clause
-
Latest release: 0.5
published almost 4 years ago
Rankings
Dependent packages count: 28.8%
Stargazers count: 32.8%
Average: 33.2%
Dependent repos count: 34.0%
Forks count: 37.3%
Last synced:
11 months ago