public double doTest(int cvTestFractionInd) {
        //DataIter testDataIter = new SentimentDataIter(false, loadPriorPolarityFeature);
        SentimentDataIter cvTestDataIter = null;
        if (cvTestFractionInd != cvFold - 1) {  // // testing on [cvTestInd/5, (cvTestInd + 1)/5)
            cvTestDataIter = new SentimentDataIter(false, fullTrainDataIter,
                    cvTestFractionInd * oneChunkSize, (cvTestFractionInd + 1) * oneChunkSize);
        } else {  // Test on the last chunk
            cvTestDataIter = new SentimentDataIter(false, fullTrainDataIter,
                    cvTestFractionInd * oneChunkSize, fullTrainDataIter.getTrainSequenceList().size());
        }
        System.out.println("Test fraction size= " + cvTestDataIter.getTestSequenceList().size()
                + "  Start test from ind = " + cvTestFractionInd * oneChunkSize + "  to ind= "
                + (cvTestFractionInd + 1) * oneChunkSize);

        int correctCount = 0;
        int truePosCountInTest = 0;
        while (cvTestDataIter.hasNext()) {
            SentimentTestSequence oneTest = (SentimentTestSequence)cvTestDataIter.next();
            crfModel.apply(oneTest);
            //int posCount = 0;
            for (int i = 0; i < oneTest.length(); i++) {
                System.out.print(oneTest.x(i) + "(" + oneTest.getPredictLabelSeq()[i+1] + ") ");  // i+1 because of shifting
                if (oneTest.getPredictLabelSeq()[i] == 1) {
              //      posCount++;
                }
            }
            boolean isPos = oneTest.getPredSentencePolarity();
            if (isPos) {  // Only check the root polarity
                System.out.println("   Positive(Exp: " + ((oneTest.y(-1) == 1)? "Pos":"Neg") + ")");
            } else {
                System.out.println("   Negative(Exp: " + ((oneTest.y(-1) == 1)? "Pos":"Neg") + ")");
            }
            if (isPos == (oneTest.y(-1) == 1)) {
                correctCount++;
            }
            if (oneTest.y(-1) == 1) {  // This test sequence is actually positive
                truePosCountInTest++;
            }
        }

        double testAccuracy = (double)correctCount /
                (double)(((SentimentDataIter)cvTestDataIter).getTestSequenceList().size());
        System.out.println("CV test index= " + cvTestFractionInd + " Correct Count= " + correctCount
                + "(" + cvTestDataIter.getTestSequenceList().size() + ")  Correct RATIO= "
                + testAccuracy);
        System.out.println("Pos in Test: " + truePosCountInTest + "   pos ratio: " +
                (double)truePosCountInTest/(double)(cvTestDataIter.getTestSequenceList().size()));

        return testAccuracy;
    }