public HashMap<Integer, Double> rank_term(ArrayList<Integer> paperList) {
		HashMap<Integer, Double> rank = new HashMap<Integer, Double>();

		for (int i = 0; i < paperList.size(); i++) {
			int paperid = paperList.get(i);
			HashMap<Integer, Double> termMap = Store.getInstance().pt
					.get(paperid);
			if (termMap == null)
				continue;
			Iterator<Integer> it = termMap.keySet().iterator();
			while (it.hasNext()) {
				int termid = it.next();
				double value = termMap.get(termid);
				if (rank.containsKey(termid)) {
					double oldvalue = rank.get(termid);
					value += oldvalue;
					rank.put(termid, value);// update
				} else {
					rank.put(termid, value);
				}
			}
		}
		// term number in the cluster
		Iterator<Integer> rank_it = rank.keySet().iterator();
		double sum = 0;
		while (rank_it.hasNext()) {
			int key = rank_it.next();
			sum += rank.get(key);
		}
		// norm the rank matrix.
		Iterator<Integer> it2 = rank.keySet().iterator();
		while (it2.hasNext()) {
			int key = it2.next();
			double value = rank.get(key);
			rank.put(key, value / sum);
		}
		// add zero term to rank
		for (int i = 0; i < Store.getInstance().t; i++) {
			if (!rank.containsKey(i))
				rank.put(i, 0.0);
		}
		System.gc();
		return rank;
	}