metaphone3
v1.0.1
Published
Metaphone 3 implementation
Downloads
56
Maintainers
Readme
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 ]