phonetics
v1.0.7
Published
A nodejs library for phonetic string matching which exposes implementation of phonetic algorithms like soundex, metaphone and double-metaphone algorithms.
Downloads
2,141
Maintainers
Readme
Usage
- Soundex
const Phonetics = require('phonetics');
console.log(Phonetics.soundex('phonetic'));
output: p532
- Soundex match
const Phonetics = require('phonetics');
console.log(Phonetics.soundexMatch('phonetic', 'phonetics'));
output: true
- Metaphone
const Phonetics = require('phonetics');
console.log(Phonetics.metaphone('phonetic'));
output: FNTK
- Metaphone match
const Phonetics = require('phonetics');
console.log(Phonetics.metaphoneMatch('phonetic', 'phonetics'));
output: false
- Double Metaphone
const Phonetics = require('phonetics');
console.log(Phonetics.doubleMetaphone('phonetic'));
output: [ 'FNTK', 'FNTK' ]
- Double Metaphone match
const Phonetics = require('phonetics');
console.log(Phonetics.doubleMetaphoneMatch('phonetic', 'phonetics'));
output: false