@Override
	public FileVisitResult postVisitDirectory(Path dir, IOException exc)
			throws IOException {

		String name = "" + dir;
                if (!name.toLowerCase().contains("sopa")) {
                	return CONTINUE;
                }
		if (name.equalsIgnoreCase(ROOTDIR))
			return CONTINUE;
		String[] comps = name.split("/");
		String tmp = comps[comps.length - 1].toLowerCase();
		func.setForegroundCorpus(docs);
		Sentence.resetSeen();
		if (related.length == 0) {
			p.addColumn(tmp, Printer.Type.BOTH);
		} else {
			p.addColumn(StringUtils.join(related, " "), Printer.Type.BOTH);
		}
		p.addColumn(docs.documents.size(), Printer.Type.BOTH);
		p.addColumn(docs.numSentences(), Printer.Type.BOTH);

		long totalWords = 0;
		List<String> summary = new ArrayList<String>();
		while (totalWords < 100) {
			List<Sentence> sentences;
			if (mode == ScoreFunctionFactory.Mode.KLSUM) {
				((KLSumPlusScoreFunction) func).printTopTerms(10);
				sentences = docs.getBestSnippet(func, 2, 5, 35, 90);
			} else {
				((SumBasicScoreFunction) func).printTopTerms(5);
				sentences = docs.getBestSnippet(func, 1, 1, 0, 99999999);
			}
			
			if (sentences == null)	break;
			for (Sentence sentence : sentences) {
				summary.add(sentence.sentence);
				totalWords += sentence.terms.size();
				sentence.setSeen();
				func.update(sentence.terms);
				System.out.println(sentence);
			}
			System.out.println("-----------------------------------------------------");
		}
		long executionTime = System.currentTimeMillis() - dirStart;

		p.addColumn(totalWords, Printer.Type.BOTH);
		p.addColumn(executionTime, Printer.Type.TIMING);
		p.addColumn(StringUtils.join(summary, " "), Printer.Type.TEXT);
		p.endRow();
		return CONTINUE;
	}