metaphone3
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

metaphone3

This is Lawrence Philips's metaphone3 implementation ported/transpiled using cincheo/jsweet.

You can find the original in OpenRefine's repo here

Install

npm install metaphone3

Usage

import { metaphone3 } from '.';

metaphone3('Amin');         // => [ 'AMN', undefined ]
metaphone3('iron');         // => [ 'ARN', undefined ]
metaphone3('witz');         // => [ 'TS', 'FX' ]
metaphone3('');             // => [ '', undefined ]
metaphone3('VILLASENOR');   // => [ 'FLSNR', 'FSNR' ]
metaphone3('GUILLERMINA');  // => [ 'KRMN', undefined ]
metaphone3('PADILLA');      // => [ 'PTL', 'PT' ]
metaphone3('BJORK');        // => [ 'PRK', undefined ]
metaphone3('belle');        // => [ 'PL', undefined ]
metaphone3('ERICH');        // => [ 'ARK', 'ARX' ]
metaphone3('CROCE');        // => [ 'KRX', 'KRS' ]
metaphone3('GLOWACKI');     // => [ 'KLK', 'KLFSK' ]
metaphone3('qing');         // => [ 'XNK', undefined ]
metaphone3('tsing');        // => [ 'XNK', undefined ]

metaphone3('Guillermo', { encodeExact: true, encodeVowels: true });
// => [ 'GARMA', undefined ]

Package Sidebar

Install

npm i metaphone3

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

1.19 MB

Total Files

9

Last publish

Collaborators

  • aminnaggar