Here you can find the source of normalizeWord(String word)
public static String normalizeWord(String word)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Method; public class Main { public static String normalizeWord(String word) { try {/* w w w . j ava 2s. c om*/ int i; Class<?> normalizerClass = Class.forName("java.text.Normalizer"); Class<?> normalizerFormClass = null; Class<?>[] nestedClasses = normalizerClass.getDeclaredClasses(); for (i = 0; i < nestedClasses.length; i++) { Class<?> nestedClass = nestedClasses[i]; if (nestedClass.getName().equals("java.text.Normalizer$Form")) { normalizerFormClass = nestedClass; } } assert normalizerFormClass.isEnum(); Method methodNormalize = normalizerClass.getDeclaredMethod("normalize", CharSequence.class, normalizerFormClass); Object nfcNormalization = null; Object[] constants = normalizerFormClass.getEnumConstants(); for (i = 0; i < constants.length; i++) { Object constant = constants[i]; if (constant.toString().equals("NFC")) { nfcNormalization = constant; } } return (String) methodNormalize.invoke(null, word, nfcNormalization); } catch (Exception ex) { return null; } } }