metaphone
Metaphone algorithm.
Install
This package is ESM only: Node 12+ is needed to use it and it must be import
ed
instead of require
d.
npm:
npm install metaphone
API
This package exports the following identifiers: metaphone
.
There is no default export.
import {metaphone} from 'metaphone'
metaphone('michael')
metaphone('crevalle')
metaphone('Filipowitz')
metaphone('Xavier')
metaphone('delicious')
metaphone('acceptingness')
metaphone('allegrettos')
With stemmer:
var metaphone = require('metaphone')
var stemmer = require('stemmer')
metaphone(stemmer('acceptingness'))
metaphone(stemmer('allegrettos'))
CLI
Usage: metaphone [options] <words...>
Metaphone implementation
Options:
-h, --help output usage information
-v, --version output version number
Usage:
# output phonetics
$ metaphone considerations detestable
# KNSTRXNS TTSTBL
# output phonetics from stdin
$ echo 'hiccups vileness' | metaphone
# HKKPS FLNS
# with stemmer
$ echo 'vileness' | stemmer | metaphone
# FL
Related
License
MIT © Titus Wormer