If you’re doing anything with natural language processing in Node.js, natural is a great library that has some common algorithms all in one place. They have everything from distance algorithms to phonetic-similarity algorithms like Soundex & Metaphone.

I just added a Dice’s Coefficient implementation today, and its really easy to use:

var natural = require('natural');
console.log(natural.DiceCoefficient('thing', 'thing')); // 1.0
console.log(natural.DiceCoefficient('not', 'the same')); // 0.0
console.log(natural.DiceCoefficient('night', 'nacht')); // 0.25