src/main/java/eu/digitisation/output/ErrorMeasure.java
public static double wordRecall(TokenArray a1, TokenArray a2) {
        int l1 = a1.length();
        int l2 = a2.length();
        double delta = (100.00 * Math.abs(l1 - l2)) / (l1 + l2);

        if (delta > 20) {
            Messages.warning("Files differ a "
                    + String.format("%.2f", delta) + " % in word length");
        }

        int indel = ArrayEditDistance.distance(a1.tokens(), a2.tokens(),
                EditDistanceType.INDEL);
        return (l1 + l2 - indel) / (double) (2 * l1);
    }
/**
     * Compute word recall rate
     *
     * @param a1 first TokenArray
     * @param a2 second TokenArray
     * @return word recall (fraction of words in a1 also in a2)
     */
Compute word recall rate
@param a1 first TokenArray
@param a2 second TokenArray
@return word recall (fraction of words in a1 also in a2)
Compute word recall rate @param a1 first TokenArray @param a2 second TokenArray @return word recall ( fraction of words in a1 also in a2 )
public static double wordRecall(TokenArray a1, TokenArray a2) {
        int l1 = a1.length();
        int l2 = a2.length();
        double delta = (100.00 * Math.abs(l1 - l2)) / (l1 + l2);
        if (delta > 20) {
            Messages.warning("Files differ a "
                    + String.format("%.2f", delta) + " % in word length");
        }
        int indel = ArrayEditDistance.distance(a1.tokens(), a2.tokens(),
                EditDistanceType.INDEL);
        return (l1 + l2 - indel) / (double) (2 * l1);
    }
public static double wordRecall ( TokenArray a1 , TokenArray a2 ) { int l1 = a1 . length ( ) ; int l2 = a2 . length ( ) ; double delta = ( 100.00 * Math . abs ( l1 - l2 ) ) / ( l1 + l2 ) ; if ( delta > 20 ) { Messages . warning ( "Files differ a " + String . format ( "%.2f" , delta ) + " % in word length" ) ; } int indel = ArrayEditDistance . distance ( a1 . tokens ( ) , a2 . tokens ( ) , EditDistanceType . INDEL ) ; return ( l1 + l2 - indel ) / ( double ) ( 2 * l1 ) ; }
Compute word recall rate
 @param a1 first TokenArray
 @param a2 second TokenArray
 @return word recall (fraction of words in a1 also in a2)
Compute word recall rate @param a1 first TokenArray @param a2 second TokenArray @return word recall ( fraction of words in a1 also in a2 )