private void test(String testPath){
        Scanner scanner = null;
        try {
            scanner = new Scanner(new File(testPath));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

        while (scanner.hasNext()){
            total += 1;
            String path = scanner.nextLine();
            int result = bayse(path);
            if(Pattern.matches("con.*", path) && result == 1){
                hit++;
            }else if(Pattern.matches("lib.*", path) && result == 0) {
                hit++;
            }
        }
       // System.out.printf("%.04f", (hit * 1.0) / (total * 1.0));
        System.out.printf("Accuracy: %.04f", (hit * 1.0)  / (total * 1.0));
    }