src/main/java/eu/digitisation/output/CharStatTable.java
public StringBuilder asCSV(String recordSeparator, String fieldSeparator) {
        StringBuilder builder = new StringBuilder();

        builder.append("Character")
                .append(fieldSeparator).append("Total")
                .append(fieldSeparator).append("Spurious")
                .append(fieldSeparator).append("Confused")
                .append(fieldSeparator).append("Lost")
                .append(fieldSeparator).append("Error rate");

        for (Character c : leftKeySet()) {
            int spu = value(c, EdOp.INSERT);
            int sub = value(c, EdOp.SUBSTITUTE);
            int add = value(c, EdOp.DELETE);
            int tot = value(c, EdOp.KEEP) + sub + add;
            double rate = (spu + sub + add) / (double) tot * 100;
            builder.append(recordSeparator);
            builder.append(c)
                    .append("[")
                    .append(Integer.toHexString(c))
                    .append("]")
                    .append(fieldSeparator).append(tot)
                    .append(fieldSeparator).append(spu)
                    .append(fieldSeparator).append(sub)
                    .append(fieldSeparator).append(add)
                    .append(fieldSeparator).append(String.format("%.2f", rate));
        }
        return builder;
    }
/**
     * Prints separate statistics of errors for every character
     *
     * @param recordSeparator text between data records
     * @param fieldSeparator text between data fields
     * @return text with the statistics: every character separated by a record
     * separator and every type of edit operation separated by field separator.
     *
     */
Prints separate statistics of errors for every character
@param recordSeparator text between data records
@param fieldSeparator text between data fields
@return text with the statistics: every character separated by a record
separator and every type of edit operation separated by field separator.
Prints separate statistics of errors for every character @param recordSeparator text between data records @param fieldSeparator text between data fields @return text with the statistics : every character separated by a record separator and every type of edit operation separated by field separator .
public StringBuilder asCSV(String recordSeparator, String fieldSeparator) {
        StringBuilder builder = new StringBuilder();
        builder.append("Character")
                .append(fieldSeparator).append("Total")
                .append(fieldSeparator).append("Spurious")
                .append(fieldSeparator).append("Confused")
                .append(fieldSeparator).append("Lost")
                .append(fieldSeparator).append("Error rate");
        for (Character c : leftKeySet()) {
            int spu = value(c, EdOp.INSERT);
            int sub = value(c, EdOp.SUBSTITUTE);
            int add = value(c, EdOp.DELETE);
            int tot = value(c, EdOp.KEEP) + sub + add;
            double rate = (spu + sub + add) / (double) tot * 100;
            builder.append(recordSeparator);
            builder.append(c)
                    .append("[")
                    .append(Integer.toHexString(c))
                    .append("]")
                    .append(fieldSeparator).append(tot)
                    .append(fieldSeparator).append(spu)
                    .append(fieldSeparator).append(sub)
                    .append(fieldSeparator).append(add)
                    .append(fieldSeparator).append(String.format("%.2f", rate));
        }
        return builder;
    }
public StringBuilder asCSV ( String recordSeparator , String fieldSeparator ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( "Character" ) . append ( fieldSeparator ) . append ( "Total" ) . append ( fieldSeparator ) . append ( "Spurious" ) . append ( fieldSeparator ) . append ( "Confused" ) . append ( fieldSeparator ) . append ( "Lost" ) . append ( fieldSeparator ) . append ( "Error rate" ) ; for ( Character c : leftKeySet ( ) ) { int spu = value ( c , EdOp . INSERT ) ; int sub = value ( c , EdOp . SUBSTITUTE ) ; int add = value ( c , EdOp . DELETE ) ; int tot = value ( c , EdOp . KEEP ) + sub + add ; double rate = ( spu + sub + add ) / ( double ) tot * 100 ; builder . append ( recordSeparator ) ; builder . append ( c ) . append ( "[" ) . append ( Integer . toHexString ( c ) ) . append ( "]" ) . append ( fieldSeparator ) . append ( tot ) . append ( fieldSeparator ) . append ( spu ) . append ( fieldSeparator ) . append ( sub ) . append ( fieldSeparator ) . append ( add ) . append ( fieldSeparator ) . append ( String . format ( "%.2f" , rate ) ) ; } return builder ; }
Prints separate statistics of errors for every character
 @param recordSeparator text between data records
 @param fieldSeparator text between data fields
 @return text with the statistics: every character separated by a record
 separator and every type of edit operation separated by field separator.
Prints separate statistics of errors for every character @param recordSeparator text between data records @param fieldSeparator text between data fields @return text with the statistics : every character separated by a record separator and every type of edit operation separated by field separator .