public static TreeMap<String, Double> processString(String line) {
		TreeMap<String, Double> output = new TreeMap<String, Double>();
		
		StringTokenizer tokenizer = new StringTokenizer(line);
		while (tokenizer.hasMoreTokens()) {
			String token = tokenizer.nextToken()
					.replaceAll("[^\\p{Alpha}]+", "").toLowerCase();

			for (int i = 0; i < token.length(); i += 2) { //split the string for char combinations
				String substr = token;
				if (token.length() > 1) { // filter words with only one character
					if (i < token.length() - 1)
						substr = substr.substring(i, i + 2); 
					else if ((i == token.length() - 1))
						substr = substr.substring(i - 1);
					//increment object counter if exists, else add
					if(output.containsKey(substr))
						output.put(substr, output.get(substr)+1);
					else
						output.put(substr, new Double(1));
				}
			}
		}
		//System.out.println(output.toString()); //DELME	
		//System.out.println(entriesSortedByValues(output)); //DELME
		
		Double sum = 0.0; //needed for normalization		
		Iterator it = output.entrySet().iterator();
		while(it.hasNext()) {
			  Entry<String,Double> entry = (Entry<String, Double>) it.next();
			  Double value = entry.getValue();
			  sum+=value;
			}
		it = output.entrySet().iterator();
		Double leastOccurences=(sum/output.size());
		while(it.hasNext()) {
			  Entry<String,Double> entry = (Entry<String, Double>) it.next();
			  String key = entry.getKey();
			  Double value = entry.getValue();
			  if(value>leastOccurences) //must appear more than average times
				  output.put(key, value/sum); //calculate percentage
			  else
				  it.remove(); //..or remove from map
			}
		return output;
	}