@SuppressWarnings({ "rawtypes", "unchecked" })
	void splitLineToMap(HashMap hashMap, String line) {
		String[] words=line.split(" ");
		HashMap<String,HashMap<String,Integer>> bigramMap=(HashMap<String,HashMap<String,Integer>>)hashMap;
		ArrayList<String> wordList=new ArrayList<String>(words.length+1);
		for(String word:words){
			if(word.isEmpty())
				continue;
			wordList.add(word);
		}
		
		//count the number of each word
		for(int i=0;i<wordList.size();i++){
			//if the word is "",ignore it
			String word=wordList.get(i);
			//totalCount++;
			//if the word hasn't been counted, add it to the map
			if(!bigramMap.containsKey(word)){
				bigramMap.put(word,new HashMap<String,Integer>());
			}
			//if it's the last word, then follow word should be padding symbol
			String followWord=((i==wordList.size()-1)?"":wordList.get(i+1));
			HashMap<String,Integer> subMap=bigramMap.get(word);
			if(!subMap.containsKey(followWord)){
				subMap.put(followWord,0);
			}
			//add the count of this word by one
			subMap.put(followWord,subMap.get(followWord)+1);
		}	
		
	}