private double[][] evalFolder(String autosum, String sum) {
        File dir = new File(autosum);
        String[] directories = dir.list();
        int counter = 0;
        double[][] avg = new double[4][3];
        String output = "";
        for (String d : directories) {
            File directory = new File(dir.getPath() + "/" + d);
            if (directory.isFile()) {
                continue;
            }
            File[] files = directory.listFiles();    // Reading directory contents
            for (File file : files) {
                try {
                    String name = file.getName();
                    double[][] rouge = eval.rouge(autosum + "/" + d + "/" + name,
                            new String[]{sum + "/" + d + "/" + name});
                    output += d + "/" + name + ":\n";
                    for (int i = 0; i < 4; i++) {
                        double[] r = rouge[i];
                        for (int j = 0; j < r.length; j++) {
                            avg[i][j] += r[j];
                        }
//                        System.out.println("Recall = " + r[0] + "\tPrecision = " + r[1] + "\tF = " + r[2]);
                        output += "Rouge-" + (i + 1) + ": \tRecall = " + r[0] + "\tPrecision = " + r[1] + "\tF = " + r[2] + "\n";
                    }
                    output += "\n";
                    counter++;
                } catch (Exception ex) {
//                    System.out.println("Failure on file " + files[k].getPath() + "!\n\n");
                }
            }
        }
        System.out.println("\n" + counter + " văn bản đã được đánh giá");

        output += "Average:\n";
        for (int i = 0; i < 4; i++) {
            avg[i][0] /= counter;
            avg[i][1] /= counter;
            avg[i][2] /= counter;
            output += "Rouge-" + (i + 1) + ": \tRecall = " + avg[i][0] + "\tPrecision = " + avg[i][1] + "\tF = " + avg[i][2] + "\n";
        }
        IOUtil.WriteToFile("temp/my_eval_ui.txt", output);
        JOptionPane.showMessageDialog(this, "Kết quả chi tiết đã được lưu vào file my_eval_ui.txt trong thư mục temp");
//        System.out.println(output);

        return avg;
    }