public static HashMap<Character, Integer> initCharCountMap(String[] text) {

		HashMap<Character, Integer> CharFreqMap = new HashMap<Character, Integer>();

		for (int i = 0; i < text.length; i++) {
			for (int k = 0; k < text[i].length(); k++) {
				char c = text[i].charAt(k);

				if (CharFreqMap.containsKey(c)) {
					CharFreqMap.put(c, CharFreqMap.get(c) + 1);
				} else if (c != ' ') { // ignore spaces
					CharFreqMap.put(c, 1);
				}
			}
		}

		return CharFreqMap;
	}