{"id":32231798,"url":"https://github.com/words/metaphone","last_synced_at":"2025-12-12T03:34:44.854Z","repository":{"id":18011561,"uuid":"21033869","full_name":"words/metaphone","owner":"words","description":"Fast Metaphone implementation","archived":false,"fork":false,"pushed_at":"2022-11-02T08:33:44.000Z","size":605,"stargazers_count":50,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-22T11:48:26.435Z","etag":null,"topics":["algorithm","metaphone","natural-language","phonetic","soundex"],"latest_commit_sha":null,"homepage":"https://words.github.io/metaphone/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/words.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":"funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"wooorm"}},"created_at":"2014-06-20T10:16:27.000Z","updated_at":"2025-08-10T17:28:32.000Z","dependencies_parsed_at":"2022-08-04T22:00:39.883Z","dependency_job_id":null,"html_url":"https://github.com/words/metaphone","commit_stats":null,"previous_names":["wooorm/metaphone"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/words/metaphone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fmetaphone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fmetaphone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fmetaphone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fmetaphone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/words","download_url":"https://codeload.github.com/words/metaphone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fmetaphone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280431488,"owners_count":26329786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","metaphone","natural-language","phonetic","soundex"],"created_at":"2025-10-22T11:48:29.030Z","updated_at":"2025-10-22T11:48:30.928Z","avatar_url":"https://github.com/words.png","language":"JavaScript","readme":"# metaphone\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\n[Metaphone][wiki] phonetic algorithm.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`metaphone(value)`](#metaphonevalue)\n*   [CLI](#cli)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [Security](#security)\n*   [License](#license)\n\n## What is this?\n\nThis package exposes a phonetic algorithm.\nThat means it gets a certain string (typically an English word), and turns it\ninto a code, which can then be compared to other codes (of other words), to\ncheck if they are (likely) pronounced the same.\n\n## When should I use this?\n\nYou’re probably dealing with natural language, and know you need this, if\nyou’re here!\n\nDepending on your needs, [`double-metaphone`][double-metaphone] might be better.\n\nDepending on your goals, you likely want to additionally use a stemmer (such as\n[`stemmer`][stemmer]).\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 14.14+, 16.0+), install with [npm][]:\n\n```sh\nnpm install metaphone\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {metaphone} from 'https://esm.sh/metaphone@2'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {metaphone} from 'https://esm.sh/metaphone@2?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\n```js\nimport {metaphone} from 'metaphone'\n\nmetaphone('michael') // =\u003e 'MXL'\nmetaphone('crevalle') // =\u003e 'KRFL'\nmetaphone('Filipowitz') // =\u003e 'FLPWTS'\nmetaphone('Xavier') // =\u003e 'SFR'\nmetaphone('delicious') // =\u003e 'TLSS'\nmetaphone('acceptingness') // =\u003e 'AKSPTNKNS'\nmetaphone('allegrettos') // =\u003e 'ALKRTS'\n```\n\nWith [`stemmer`][stemmer]:\n\n```js\nimport {metaphone} from 'metaphone'\nimport {stemmer} from 'stemmer'\n\nmetaphone(stemmer('acceptingness')) // =\u003e 'AKSPTNK'\nmetaphone(stemmer('allegrettos')) // =\u003e 'ALKRT'\n```\n\n## API\n\nThis package exports the identifier `metaphone`.\nThere is no default export.\n\n### `metaphone(value)`\n\nGet the metaphone code from a given value.\n\n###### `value`\n\nValue to use (`string`, required).\n\n##### Returns\n\nMetaphone code for `value` (`string`).\n\n## CLI\n\n```txt\nUsage: metaphone [options] \u003cwords...\u003e\n\nMetaphone implementation\n\nOptions:\n\n  -h, --help           output usage information\n  -v, --version        output version number\n\nUsage:\n\n# output phonetics\n$ metaphone considerations detestable\n# KNSTRXNS TTSTBL\n\n# output phonetics from stdin\n$ echo 'hiccups vileness' | metaphone\n# HKKPS FLNS\n\n# with stemmer\n$ echo 'vileness' | stemmer | metaphone\n# FL\n```\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 14.14+ and 16.0+.\nIt also works in Deno and modern browsers.\n\n## Related\n\n*   [`double-metaphone`][double-metaphone]\n    — double metaphone algorithm\n*   [`soundex-code`](https://github.com/words/soundex-code)\n    — soundex algorithm\n*   [`stemmer`](https://github.com/words/stemmer)\n    — porter stemmer algorithm\n*   [`dice-coefficient`](https://github.com/words/dice-coefficient)\n    — sørensen–dice coefficient\n*   [`levenshtein-edit-distance`](https://github.com/words/levenshtein-edit-distance)\n    — levenshtein edit distance\n*   [`syllable`](https://github.com/words/syllable)\n    — syllable count of English words\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## Security\n\nThis package is safe.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/words/metaphone/workflows/main/badge.svg\n\n[build]: https://github.com/words/metaphone/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/words/metaphone.svg\n\n[coverage]: https://codecov.io/github/words/metaphone\n\n[downloads-badge]: https://img.shields.io/npm/dm/metaphone.svg\n\n[downloads]: https://www.npmjs.com/package/metaphone\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/metaphone.svg\n\n[size]: https://bundlephobia.com/result?p=metaphone\n\n[npm]: https://www.npmjs.com\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[wiki]: https://en.wikipedia.org/wiki/Metaphone\n\n[stemmer]: https://github.com/words/stemmer\n\n[double-metaphone]: https://github.com/words/double-metaphone\n","funding_links":["https://github.com/sponsors/wooorm"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwords%2Fmetaphone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwords%2Fmetaphone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwords%2Fmetaphone/lists"}