private static HashMap<String,Double> tf(Map<String,Long> segWordsResult) { 
 
        HashMap<String, Double> tf = new HashMap<String, Double>();// 正规化  
        if(segWordsResult==null || segWordsResult.size()==0){
    		return tf;
    	}
        Long size=Long.valueOf(0);
        
        Set<String> keys=segWordsResult.keySet();
        for(String key: keys){
        	size=size+segWordsResult.get(key);
        }
        for(String key: keys){
        	Long value=segWordsResult.get(key);
        	tf.put(key, Double.valueOf(value)/size);
        }
        return tf;  
    }