public double evaluateSet(boolean output, boolean evalWithPunc)
    		throws IOException {
    	
    	if (pruner != null) pruner.resetPruningStats();
    	
    	DependencyReader reader = DependencyReader.createDependencyReader(options);
    	reader.startReading(options.testFile);
    	

    	DependencyWriter writer = null;
    	if (output && options.outFile != null) {
    		writer = DependencyWriter.createDependencyWriter(options, pipe);
    		writer.startWriting(options.outFile);
    	}
    	
    	DependencyDecoder synDecoder = DependencyDecoder.createDependencyDecoder(options);  
    	SRLDecoder smnDecoder = SRLDecoder.createSRLDecoder(options);  

    	Evaluator eval = new Evaluator(options, pipe);
    	
		long start = System.currentTimeMillis();
    	
    	DependencyInstance inst = pipe.createInstance(reader);    	
    	while (inst != null) {
    		LocalFeatureData lfd = new LocalFeatureData(inst, this, true);
    		GlobalFeatureData gfd = new GlobalFeatureData(lfd); 
    		    		    		
		    DependencyInstance synTree = synDecoder.decode(inst, lfd, gfd, false);
		    lfd.predictLabels(synTree.heads, synTree.deplbids, false);

		    SRLFeatureData sfd = new SRLFeatureData(synTree, options, pipe, parameters);
		    DependencyInstance predInst = smnDecoder.decode(synTree, sfd, false);

            eval.add(inst, predInst, evalWithPunc);

    		if (writer != null) {
    			inst.heads = predInst.heads;
    			inst.deplbids = predInst.deplbids;
    			inst.numframes = predInst.numframes;
    			inst.frames = predInst.frames;
    			writer.writeInstance(inst);
    		}
    		
    		inst = pipe.createInstance(reader);
    	}
    	
    	reader.close();
    	if (writer != null) writer.close();
    	
    	System.out.printf("  Tokens: %d%n", eval.tot);
    	System.out.printf("  Sentences: %d%n", eval.nsents);
    	System.out.printf("  UAS=%.6f\tLAS=%.6f\tCAS=%.6f%n" + 
    					  "  Pre=%.6f\tRec=%.6f\t F1=%.6f\t[%ds]%n",
    			eval.UAS(), eval.LAS(), eval.CAS(),
    			eval.Precision(), eval.Recall(), eval.F1(),
    			(System.currentTimeMillis() - start)/1000);
    	System.out.printf("  Pred-Aug pair filtering recall: %.2f%n",
    			eval.FilteringRecall()*100);
    	if (options.pruning && options.learningMode != LearningMode.Basic && pruner != null)
    		pruner.printPruningStats();
    	
    	//eval.dumpArgStats();
    	eval.dumpPathStats();
    	
        synDecoder.shutdown();
        smnDecoder.shutdown();

    	//return eval.UAS();
        return eval.F1();
    }