public SortedMap<String,Double> countWords(String strDir,Map<String, Double> wordMap) throws IOException{
		File sampleFile = new File(strDir);
		File [] sample = sampleFile.listFiles();
		String word;
		for(int i = 0; i < sample.length; i++){
			if(!sample[i].isDirectory()){
				if(sample[i].getName().contains("stemed")){
					FileReader samReader = new FileReader(sample[i]);
					BufferedReader samBR = new BufferedReader(samReader);
					while((word = samBR.readLine()) != null){
						if(!word.isEmpty() && wordMap.containsKey(word)){
							double count = wordMap.get(word) + 1;
							wordMap.put(word, count);
						}
						else {
							wordMap.put(word, 1.0);
						}
					}
				}	
			}
			else countWords(sample[i].getCanonicalPath(),wordMap);
		}
		//ֻسִ3ĵ
		SortedMap<String,Double> newWordMap = new TreeMap<String,Double>();
		Set<Map.Entry<String,Double>> allWords = wordMap.entrySet();
		for(Iterator<Map.Entry<String,Double>> it = allWords.iterator(); it.hasNext();){
			Map.Entry<String, Double> me = it.next();
			if(me.getValue() > 3){
				newWordMap.put(me.getKey(),me.getValue());
			}
		}
		System.out.println("newWordMap" + newWordMap.size());
		return newWordMap;	
	}