Ticket #17588: 17588_levenshteindistance.patch
| File 17588_levenshteindistance.patch, 1.4 KB (added by , 7 years ago) |
|---|
-
build.properties
13 13 14 14 # the lowest JOSM version the curent plugin version is compatible with 15 15 # 16 josm.required.version=14 15316 josm.required.version=14371 17 17 18 18 # the full path to the JOSM jar against which this plugin is built 19 19 # -
src/org/openstreetmap/josm/plugins/conflation/matcher/LevenshteinDistanceValueMatcher.java
1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.plugins.conflation.matcher; 3 3 4 import org.openstreetmap.josm. data.validation.tests.SimilarNamedWays;4 import org.openstreetmap.josm.tools.Utils; 5 5 6 6 public class LevenshteinDistanceValueMatcher implements ValueMatcher { 7 7 … … 23 23 if (maxLength == 0) 24 24 return 1.0; 25 25 double divider = (distanceThreshold > 0) ? distanceThreshold : maxLength; 26 return Math.max(0.0, 1.0 - ((double) SimilarNamedWays.getLevenshteinDistance(target, candidate) / divider));26 return Math.max(0.0, 1.0 - ((double) Utils.getLevenshteinDistance(target, candidate) / divider)); 27 27 } 28 28 }
