NaturalLanguage.levenshtein()

Determine the Levenstein distance between two strings.

The Levenshtein distance is a number that helps quantify the difference between two strings. Informally, the Levenshtein distance between two words is the minimum number of single-character edits (i.e. insertions, deletions or substitutions) required to change one word into the other.

Usage

Hover over inputs/exits for more info.

var NaturalLanguage = require('machinepack-nlp');


// Determine the Levenstein distance between two strings.

NaturalLanguage.levenshtein({

a: 'kitten',

b: 'sittin',

}).execSync();

Inputs

a required

'kitten'
b required

'sittin'

Exits

error

An unexpected error occurred.

success

OK.

2