Neat Paraskavedekatriaphobia's Meaning
Miss any of our Open RFC calls?Watch the recordings here! »

metaphone

1.0.6 • Public • Published

metaphone

Build Coverage Downloads Size

Metaphone algorithm.

Install

npm:

npm install metaphone

API

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

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

706

Version

1.0.6

License

MIT

Unpacked Size

13.9 kB

Total Files

5

Last publish

Collaborators

  • avatar
  • avatar