src/main/java/eu/digitisation/distance/EditDistance.java
public static int[] wordDistance(String s1, String s2, int chunkLen) {
        MinimalPerfectHash mph = new MinimalPerfectHash(true); // case sensitive
        TokenArray a1 = new TokenArray(mph, s1);
        TokenArray a2 = new TokenArray(mph, s2);
        EditSequence seq = new EditSequence(a1, a2, chunkLen);
        return new int[]{a1.length(), a2.length(), seq.length()};
    }
/**
     * @param s1 the first string.
     * @param s2 the second string.
     * @param chunkLen the length of the chunks analyzed at every step (must be
     * strictly greater than 1)
     * @return the length (number of words) of first, the length (number of
     * words) of second, and the approximate (linear time) word-based
     * Levenshtein distance between first and second.
     */
@param s1 the first string.
@param s2 the second string.
@param chunkLen the length of the chunks analyzed at every step (must be
strictly greater than 1)
@return the length (number of words) of first, the length (number of
words) of second, and the approximate (linear time) word-based
Levenshtein distance between first and second.
@param s1 the first string . @param s2 the second string . @param chunkLen the length of the chunks analyzed at every step ( must be strictly greater than 1 ) @return the length ( number of words ) of first the length ( number of words ) of second and the approximate ( linear time ) word - based Levenshtein distance between first and second .
public static int[] wordDistance(String s1, String s2, int chunkLen) {
        MinimalPerfectHash mph = new MinimalPerfectHash(true); 
        TokenArray a1 = new TokenArray(mph, s1);
        TokenArray a2 = new TokenArray(mph, s2);
        EditSequence seq = new EditSequence(a1, a2, chunkLen);
        return new int[]{a1.length(), a2.length(), seq.length()};
    }
public static int [ ] wordDistance ( String s1 , String s2 , int chunkLen ) { MinimalPerfectHash mph = new MinimalPerfectHash ( true ) ; TokenArray a1 = new TokenArray ( mph , s1 ) ; TokenArray a2 = new TokenArray ( mph , s2 ) ; EditSequence seq = new EditSequence ( a1 , a2 , chunkLen ) ; return new int [ ] { a1 . length ( ) , a2 . length ( ) , seq . length ( ) } ; }
@param s1 the first string.
@param s1 the first string .
// case sensitive