Created
November 29, 2019 20:51
-
-
Save RinatValiullov/2842a2f259d17364667d093bc6acd894 to your computer and use it in GitHub Desktop.
For translation of article "Natural language processing for Node.js" - https://bit.ly/2QZsts1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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