code: public void applyAttributeFilter(AttributeScorer filter, int rank) {
  		if (filter == null)
  			return;
  		if (rank >= this.getAttributesNum())
  			return;
  		// get the threshold
  		double threshold = filter.getValueForRank(rank);
  		// iterate on the attributes
  		// and remove them if their LLR score is below the threshold
  		Iterator termIter = this.tokenForm2index.keySet().iterator();
  		List terms2remove = new ArrayList();
  		while (termIter.hasNext()) {
  			String term = (String) termIter.next();
  			int[] index = this.tokenForm2index.get(term);
  			// get the score
  			// TODO what if we are getting -1
  			if (filter.getScore(index[0]) < threshold)
  				terms2remove.add(term);
  		}
  		for (int i = 0; i < terms2remove.size(); i++) {
  			String term = (String) terms2remove.get(i);
  			int[] index = this.tokenForm2index.remove(term);
  			this.index2docfreq.remove(Integer.valueOf(index[0]));
  		}
  	}
docs: Keep the top n attributes according to an AttributeFilter*