metaphone

1.0.4 • Public • Published

metaphone Build Status Coverage Status

Metaphone algorithm.

API

Install:

npm install metaphone

Use:

var metaphone = require('metaphone')
 
metaphone('michael') // => 'MXL'
metaphone('crevalle') // => 'KRFL'
metaphone('Filipowitz') // => 'FLPWTS'
metaphone('Xavier') // => 'SFR'
metaphone('delicious') // => 'TLSS'
metaphone('acceptingness') // => 'AKSPTNKNS'
metaphone('allegrettos') // => 'ALKRTS'

With stemmer:

var metaphone = require('metaphone')
var stemmer = require('stemmer')
 
metaphone(stemmer('acceptingness')) // => 'AKSPTNK'
metaphone(stemmer('allegrettos')) // => 'ALKRT'

CLI

Install:

npm install -g metaphone

Use:

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

install

npm i metaphone

Downloadsweekly downloads

294

version

1.0.4

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability