private HashMap<String, Integer> NGramTiling(ArrayList<String> parsedSnippets) {
		HashMap<String, Integer> term_Freq_Map = new HashMap<String, Integer>();

		String split[] = null;
		String complete = "";

		//split into individual words
		for(String list_item: parsedSnippets){
			complete = complete + " " + list_item;
		}

		split = complete.split(" ");

		if(split == null){
			return null;
		}

		String key = "";
		//uni-gram tiling and frequency
		for(int i = 0; i < split.length; i++) {	
			key = split[i];
			key = key.trim();
			key = key.toLowerCase(Locale.ENGLISH);

			if(!term_Freq_Map.containsKey(key)){
				term_Freq_Map.put(key, 1);
			}
			else {
				Integer freq = term_Freq_Map.get(key);
				freq = freq + 1;
				term_Freq_Map.put(key, freq);

			}
		}

		//bi-gram tiling and frequency
		for( int i = 0 ; i < split.length - 1; i++){
			key = split[i] + " " + split[i+1];
			key = key.trim();
			key = key.toLowerCase(Locale.ENGLISH);

			if(!term_Freq_Map.containsKey(key)){
				term_Freq_Map.put(key, 1);
			}
			else {
				Integer freq = term_Freq_Map.get(key);
				freq = freq + 1;
				term_Freq_Map.put(key, freq);

			}
		}

		//tri-gram tiling and frequency
		for( int i = 0 ; i < split.length - 2; i++){
			key = split[i] + " " + split[i+1] + " " + split[i+2];

			key = key.trim();
			key = key.toLowerCase(Locale.ENGLISH);
			if(!term_Freq_Map.containsKey(key)){
				term_Freq_Map.put(key, 1);
			}
			else {
				Integer freq = term_Freq_Map.get(key);
				freq = freq + 1;
				term_Freq_Map.put(key, freq);

			}
		}

		return term_Freq_Map;
	}