{ "info": { "author": "Andrew Collins", "author_email": "AtomBoy@SWCP.com", "bugtrack_url": null, "classifiers": [], "description": "~~~~~~~~~\nMetaphone\n~~~~~~~~~\n\n.. contents::\n :depth: 2\n :backlinks: top\n :local:\n\nAbout\n=====\n\n*A Python implementation of the Metaphone and Double Metaphone algorithms*\n\nMetaphone\n---------\nAs described on the `Wikipedia page`_, the original Metaphone algorithm was\npublished in 1990 as an improvement over the `Soundex`_ algorithm. Like\nSoundex, it was limited to English-only use. The Metaphone algorithm does not\nproduce phonetic representations of an input word or name; rather, the output\nis an intentionally approximate phonetic representation. The approximate\nencoding is necessary to account for the way speakers vary their pronunciations\nand misspell or otherwise vary words and names they are trying to spell.\n\nDouble Metaphone\n----------------\nThe Double Metaphone phonetic encoding algorithm is the second generation of\nthe Metaphone algorithm. Its implementation was described in the June 2000\nissue of C/C++ Users Journal. It makes a number of fundamental design\nimprovements over the original Metaphone algorithm.\n\nIt is called \"Double\" because it can return both a primary and a secondary code\nfor a string; this accounts for some ambiguous cases as well as for multiple\nvariants of surnames with common ancestry. For example, encoding the name\n\"Smith\" yields a primary code of SM0 and a secondary code of XMT, while the\nname \"Schmidt\" yields a primary code of XMT and a secondary code of SMT--both\nhave XMT in common.\n\nDouble Metaphone tries to account for myriad irregularities in English of\nSlavic, Germanic, Celtic, Greek, French, Italian, Spanish, Chinese, and other\norigin. Thus it uses a much more complex ruleset for coding than its\npredecessor; for example, it tests for approximately 100 different contexts of\nthe use of the letter C alone.\n\nHistory\n-------\nThis is a copy of the Python Double Metaphone algorithm, taken from `Andrew\nCollins' work`_, a Python implementation of an algorithm in C originally\ncreated by Lawrence Philips. Since then, improvements have been made by several\ncontributors, viewable in the git history.\n\nA ``resources`` directory is included with this project which contains the\nfollowing:\n\n* the original C++ file by Lawrence Philips\n\n* Kevin Atkinson's improvements to it\n\n* a C implementation (for use in a Perl extension) by Maurice Aubrey\n\nThe contributors of the Python version, originally started by Andrew Collins\ninclude:\n\n* Andrew Collins\n\n* Chris Leong\n\n* Matthew Somerville\n\n* Richard Barran\n\n* Maximillian Dornseif\n\n* Sebastien Metrot\n\n* Duncan McGreggor\n\n* Ollie Bennett\n\n* Ian Beaver\n\n* Alastair Houghton\n\nUsage\n=====\n\nRunning the Unit Tests\n----------------------\n``metaphone`` uses the ``unittest`` package from the standard library, and as\nsuch, its tests are runnable by most test runners. If you have `nose`_ installed,\nyou can do the following::\n\n $ git clone https://github.com/oubiwann/metaphone.git\n $ cd metaphone\n $ nosetests -v .\n\nIf you have Twisted installed, you can do::\n\n $ trial ./metaphone\n\nExample Code\n------------\n\nThe unit tests are full of examples, so be sure to check those out. But here's\na taste::\n\n $ python\n >>> from metaphone import doublemetaphone\n >>> doublemetaphone(\"architect\")\n (u\"ARKTKT\", u\"\")\n >>> doublemetaphone(\"bajador\")\n (u\"PJTR\", u\"PHTR\")\n >>> doublemetaphone(\"\u03a4\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c4\u03bf Unicode;\")\n (u'NKT', u'')\n\nIn the Wild\n===========\n\nThe following developers/projects make use of this library:\n\n* `Andrew Collins`_ used his original code in various music projects and\n dealing with misspelled text from data provided by various web services. This\n was then integrated with Plone/Zope projects.\n\n* `Matthew Somerville`_ uses it on Theatricalia to do people name matching, and\n it appears to work `quite well`_. The database stores the double metaphones\n for first and last names, and then upon searching simply computes the double\n metaphones of what has been entered and looks up anything that matches.\n\n* `Duncan McGreggor`_ uses it on the `\u03c6arsk project`_ to provide greater full\n text search capabilities for Indo-European language word lists and\n dictionaries.\n\n.. Links\n.. _Wikipedia page: http://en.wikipedia.org/wiki/Metaphone#Double_Metaphone\n.. _Soundex: http://en.wikipedia.org/wiki/Soundex\n.. _Andrew Collins' work: http://www.atomodo.com/code/double-metaphone/metaphone.py/view\n.. _Andrew Collins: http://www.atomodo.com/\n.. _Matthew Somerville: https://github.com/dracos/\n.. _Duncan McGreggor: https://github.com/oubiwann/\n.. _quite well: http://theatricalia.com/search?q=chuck+iwugee\n.. _\u03c6arsk project: https://github.com/oubiwann/tharsk\n.. _nose: https://nose.readthedocs.org/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/oubiwann/metaphone", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "Metaphone", "package_url": "https://pypi.org/project/Metaphone/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Metaphone/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/oubiwann/metaphone" }, "release_url": "https://pypi.org/project/Metaphone/0.6/", "requires_dist": null, "requires_python": null, "summary": "A Python implementation of the metaphone and double metaphone algorithms.", "version": "0.6" }, "last_serial": 2300554, "releases": { "0.4": [ { "comment_text": "", "digests": { "md5": "728378e1e60b531cc56aff91620c2f76", "sha256": "9e525cdabc19d2653dae199179223dbe5adf98c37071636b279647eecffff395" }, "downloads": -1, "filename": "Metaphone-0.4.tar.gz", "has_sig": false, "md5_digest": "728378e1e60b531cc56aff91620c2f76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12308, "upload_time": "2012-07-22T08:35:35", "url": "https://files.pythonhosted.org/packages/c8/d2/04721c405219d0367080978072a9e0a2c7896f8388831c7b8cac92776546/Metaphone-0.4.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "81d319c20720bd0a1d2e8529002caf06", "sha256": "ad0beadca66cb7ec6ede71ef72bb02da097c493ddf159930d6340bc83f53da27" }, "downloads": -1, "filename": "Metaphone-0.6.tar.gz", "has_sig": false, "md5_digest": "81d319c20720bd0a1d2e8529002caf06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14075, "upload_time": "2016-08-24T14:37:29", "url": "https://files.pythonhosted.org/packages/d4/ae/c9e4d007e32a6469be212da11d0b8e104d643f6f247d771742caf6ac6bb8/Metaphone-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "81d319c20720bd0a1d2e8529002caf06", "sha256": "ad0beadca66cb7ec6ede71ef72bb02da097c493ddf159930d6340bc83f53da27" }, "downloads": -1, "filename": "Metaphone-0.6.tar.gz", "has_sig": false, "md5_digest": "81d319c20720bd0a1d2e8529002caf06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14075, "upload_time": "2016-08-24T14:37:29", "url": "https://files.pythonhosted.org/packages/d4/ae/c9e4d007e32a6469be212da11d0b8e104d643f6f247d771742caf6ac6bb8/Metaphone-0.6.tar.gz" } ] }