class WikipediaDatasetCreator {

    static double getUcTokenPercentage(String string) {
        int upper = 0;
        int lower = 0;
        String[] split = string.split("\\s");
        for (String part : split) {
            if (part.length() > 0) {
                char firstChar = part.charAt(0);
                if (Character.isUpperCase(firstChar)) {
                    upper++;
                } else if (Character.isLowerCase(firstChar)) {
                    lower++;
                }
            }
        }
        return (double)upper / (upper + lower);
    }

}