Changeset 14373 in josm


Ignore:
Timestamp:
2018-10-27T15:41:32+02:00 (3 weeks ago)
Author:
simon04
Message:

see #15889 - deprecate SimilarNamedWays.getLevenshteinDistance

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/I18nSimilarStrings.java

    r14138 r14373  
    66import org.openstreetmap.josm.data.preferences.JosmBaseDirectories;
    77import org.openstreetmap.josm.data.preferences.JosmUrls;
    8 import org.openstreetmap.josm.data.validation.tests.SimilarNamedWays;
    98import org.openstreetmap.josm.gui.MainApplicationTest;
    109import org.openstreetmap.josm.plugins.PluginHandlerTestIT;
    1110import org.openstreetmap.josm.spi.preferences.Config;
    1211import org.openstreetmap.josm.tools.I18n;
     12import org.openstreetmap.josm.tools.Utils;
    1313
    1414// License: GPL. For details, see LICENSE file.
     
    4545                String a = strings.get(i);
    4646                String b = strings.get(j);
    47                 int d = SimilarNamedWays.getLevenshteinDistance(a, b);
     47                int d = Utils.getLevenshteinDistance(a, b);
    4848                if (d <= 2) {
    4949                    System.err.println(": " + a + " <--> " + b);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java

    r14371 r14373  
    111111
    112112    /**
     113     * Compute Levenshtein distance
     114     *
     115     * @param s First word
     116     * @param t Second word
     117     * @return The distance between words
     118     * @deprecated Use {@link Utils#getLevenshteinDistance} instead
     119     */
     120    @Deprecated
     121    public static int getLevenshteinDistance(String s, String t) {
     122        return Utils.getLevenshteinDistance(s, t);
     123    }
     124
     125    /**
    113126     * Add a regular expression rule.
    114127     * @param regExpr the regular expression to search for
Note: See TracChangeset for help on using the changeset viewer.