public static void testPandR(int minTokenThreshold, int maxTokenThreshold, boolean includeApproximateMatches, String tokenizationType, File directory, boolean weighted) {

        FileWriter writer;
        String csv = "";

        generateInvertedIndex(includeApproximateMatches, tokenizationType, directory);

        try {
            writer = new FileWriter("C:\\Users\\Dave\\Desktop\\output.csv");

            for (double minTFIDF = 0; minTFIDF <= 0.003; minTFIDF = minTFIDF + 0.001) {
                for (double minIDF = 0.5; minIDF <= 2.5; minIDF = minIDF + 0.5) {

                    System.out.println("");
                    System.out.println("MIN IDF: " + minIDF + ", MIN TFIDF: " + minTFIDF);
                    System.out.println("");

                    if (weighted) {
                        countMatchesWeighted(minIDF, minTFIDF);
                    } else {
                        countMatches(minIDF, minTFIDF);
                    }
                    for (int minMatchingTokens = minTokenThreshold; minMatchingTokens <= maxTokenThreshold; minMatchingTokens++) {
                        generateResults(allDocPairs, minMatchingTokens);
                        Double[] precisionAndRecall = calculatePrecisionAndRecall();
                        //if (precisionAndRecall[PRECISION] >= minPrecision && precisionAndRecall[RECALL] >= minRecall) {

                        System.out.print("Minimum Matching tokens: " + minMatchingTokens + ", " + getPrecisionAndRecall(precisionAndRecall) + "\n");

                        writer.append(String.valueOf(minTFIDF));
                        writer.append(";");
                        writer.append(String.valueOf(minIDF));
                        writer.append(";");
                        writer.append(String.valueOf(minMatchingTokens));
                        writer.append(";");
                        writer.append(String.valueOf(df.format(precisionAndRecall[PRECISION])));
                        writer.append(";");
                        writer.append(String.valueOf(df.format(precisionAndRecall[RECALL])));
                        writer.append("\n");
                        //}
                    }
                    writer.append("\n");
                    writer.append("\n");
                }

            }
            writer.flush();
            writer.close();
            System.out.println("finished");
        } catch (IOException ioe) {
            System.out.println();
        }
    }