public void doTest() {
        //DataIter testDataIter = new SentimentDataIter(false, loadPriorPolarityFeature);
        SentimentDataIter cvTestDataIter = new SentimentDataIter(false, fullTrainDataIter, 0,
                trainStartInd);
        System.out.println("Start test from ind = " + 0 + "  to ind= " + trainStartInd);

        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++;
            }
        }
        System.out.println("Correct rate= " + (double)correctCount /
                (double)(((SentimentDataIter)cvTestDataIter).getTestSequenceList().size()));
        System.out.println("Pos in Test: " + truePosCountInTest + "   pos ratio: " +
                (double)truePosCountInTest/(double)(cvTestDataIter.getTestSequenceList().size()));
    }