private void test(String testPath) throws IOException {
        int hit = 0;
        int total = 0;

        BufferedReader scanner = null;
        try {
            scanner = new BufferedReader(new FileReader(new File(testPath))); //new Scanner(new File(testPath));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

        String path = null;
        while ((path = scanner.readLine()) != null){
            total += 1;
            //String path = scanner.nextLine();
            int result = 0;
            try {
                result = bayse(path);
            } catch (IOException e) {
                e.printStackTrace();
            }

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

    }