Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
For translation of article "Natural language processing for Node.js" - https://bit.ly/2QZsts1
// index.js
var natural = require('natural');
var metaphone = natural.Metaphone;
var soundEx = natural.SoundEx;
var wordA = 'phonetics';
var wordB = 'fonetix';
if (metaphone.compare(wordA, wordB))
console.log('They sound alike!');
// We can also obtain the raw phonetics of a word using process()
console.log(metaphone.process('phonetics'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.