public void writeTermsToFile(String strNumber,
			Hashtable<String, Double> oTermVsTFIDF) throws IOException {
		String strKey = null;
		Double maxValue = Double.MIN_VALUE;
		String strTerms = "";
		int len = oTermVsTFIDF.size() < 5 ? oTermVsTFIDF.size() : 5;

		for (int i = 0; i < len; ++i) {
			for (Map.Entry<String, Double> entry : oTermVsTFIDF.entrySet()) {
				if (entry.getKey().length() > 2
						&& entry.getValue() > maxValue
						&& !stopwordsMap.containsKey(entry.getKey()
								.toLowerCase())
						&& entry.getKey().matches("[a-zA-Z]+")) {
					maxValue = entry.getValue();
					strKey = entry.getKey();
				}
			}
			strTerms = strTerms + " " + strKey;
			oTermVsTFIDF.remove(strKey);
			strKey = null;
			maxValue = Double.MIN_VALUE;
		}
		oBufferedWriter.write(strNumber + " " + strTerms.trim() + "\n");
		System.out.println(strTerms);
	}