comparison src/main/java/org/mpi/openmind/repository/utils/NormalizerUtils.java @ 89:8adfa8679991

new implementation of translit-to-romanization rules in RomanizationLoc with test(!).
author Robert Casties <casties@mpiwg-berlin.mpg.de>
date Mon, 26 Feb 2018 14:39:49 +0100
parents ad505ef703ed
children
comparison
equal deleted inserted replaced
88:ad505ef703ed 89:8adfa8679991
48 * @param text 48 * @param text
49 * @return 49 * @return
50 */ 50 */
51 public static String unicodeNormalize(String text) { 51 public static String unicodeNormalize(String text) {
52 if (!Normalizer.isNormalized(text, Normalizer.Form.NFC)) { 52 if (!Normalizer.isNormalized(text, Normalizer.Form.NFC)) {
53 Normalizer.normalize(text, Normalizer.Form.NFC); 53 text = Normalizer.normalize(text, Normalizer.Form.NFC);
54 } 54 }
55 return text; 55 return text;
56 } 56 }
57 57
58 private static Pattern old_ayn_pattern = Pattern.compile("(\u2018|\u02BB)"); // ‘|ʻ 58 private static Pattern old_ayn_pattern = Pattern.compile("(\u2018|\u02BB)"); // ‘|ʻ