src/main/java/eu/digitisation/output/ErrorMeasure.java
public static double ber(String s1, String s2) {
        TermFrequencyVector tf1 = new TermFrequencyVector(s1);
        TermFrequencyVector tf2 = new TermFrequencyVector(s2);

        return tf1.distance(tf2) / (double) tf1.total();
    }
/**
     * Compute bag-of-word error rate
     *
     * @param s1 reference string
     * @param s2 fuzzy string string
     * @return the word error rate between the (unsorted) strings
     */
Compute bag-of-word error rate
@param s1 reference string
@param s2 fuzzy string string
@return the word error rate between the (unsorted) strings
Compute bag - of - word error rate @param s1 reference string @param s2 fuzzy string string @return the word error rate between the ( unsorted ) strings
public static double ber(String s1, String s2) {
        TermFrequencyVector tf1 = new TermFrequencyVector(s1);
        TermFrequencyVector tf2 = new TermFrequencyVector(s2);
        return tf1.distance(tf2) / (double) tf1.total();
    }
public static double ber ( String s1 , String s2 ) { TermFrequencyVector tf1 = new TermFrequencyVector ( s1 ) ; TermFrequencyVector tf2 = new TermFrequencyVector ( s2 ) ; return tf1 . distance ( tf2 ) / ( double ) tf1 . total ( ) ; }
Compute bag-of-word error rate
 @param s1 reference string
 @param s2 fuzzy string string
 @return the word error rate between the (unsorted) strings
Compute bag - of - word error rate @param s1 reference string @param s2 fuzzy string string @return the word error rate between the ( unsorted ) strings