Permalink
Browse files

Merge pull request #85 from hhamalai/master

Fix the default substitution cost for Levenshtein distance
  • Loading branch information...
2 parents 70556c6 + 20dfe98 commit f8e38e41d5b1c681dbb4321207446656e4506b35 @chrisumbel chrisumbel committed May 1, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/natural/distance/levenshtein_distance.js
@@ -33,7 +33,7 @@ function LevenshteinDistance (source, target, options) {
options = options || {};
options.insertion_cost = options.insertion_cost || 1;
options.deletion_cost = options.deletion_cost || 1;
- options.substitution_cost = options.substitution_cost || 2;
+ options.substitution_cost = options.substitution_cost || 1;
var sourceLength = source.length;
var targetLength = target.length;

0 comments on commit f8e38e4

Please sign in to comment.