Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 06, 2013
@hhamalai hhamalai fixed the substitution cost for levenshtein distance 20dfe98
Commits on May 01, 2013
@chrisumbel chrisumbel Merge pull request #85 from hhamalai/master
Fix the default substitution cost for Levenshtein distance
f8e38e4
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/natural/distance/levenshtein_distance.js
View
2 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;

No commit comments for this range

Something went wrong with that request. Please try again.