public static double getPunctuationPercent(String text){
		
		int validChars = 0;
		int extraSpaceChars = 0;
		char lastChar = ' ';
		
		for (int i=0; i<text.length(); i++){

			if (Character.isUpperCase(text.charAt(i)) || Character.isLowerCase(text.charAt(i)) || text.charAt(i) == '"' || (text.charAt(i) == ' ' && lastChar != ' ')){
			
				validChars ++;
			}
			
			if (text.charAt(i) == ' ' && lastChar == ' ')
				extraSpaceChars ++;
		
			lastChar = text.charAt(i);
		}
		
		if (text.length() - extraSpaceChars > 0)
			return (double) (text.length() - validChars - extraSpaceChars) / (text.length() - extraSpaceChars);
		else
			return 1.0;
	}