]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/data/translit/Latin_NumericPinyin.txt
ICU-551.51.tar.gz
[apple/icu.git] / icuSources / data / translit / Latin_NumericPinyin.txt
index c1bfda8582bf7a1455d7fea72789d2f55e4bc892..e907d55c6b8e628a0033e9c19e7b16a2b0e4a7f4 100644 (file)
@@ -1,41 +1,22 @@
-#--------------------------------------------------------------------
-# Copyright (c) 1999-2004, International Business Machines
-# Corporation and others. All Rights Reserved.
-#--------------------------------------------------------------------
-
-# According to the pinyin definitions I've been able to find:
-# 'a', 'e' are the preferred bases
-# otherwise 'o'
-# otherwise last vowel
-
-# The trailing form of syllables are the following:
-#         "a", "ai", "ao", "an", "ang",
-#         "o", "ou", "ong",
-#         "e", "ei", "er", "en", "eng",
-#         "i", "ia", "iao", "ie", "iu", "ian", "in", "iang", "ing", "iong",
-#         "u", "ua", "uo", "uai", "ui", "uan", "un", "uang", "ueng",
-#         "ü", "üe", "üan", "ün"
-# so the letters the tone will 'hop' are:
-
+# ***************************************************************************
+# *
+# *  Copyright (C) 2004-2015, International Business Machines
+# *  Corporation; Unicode, Inc.; and others.  All Rights Reserved.
+# *
+# ***************************************************************************
+# File: Latin_NumericPinyin.txt
+# Generated from CLDR 
+#
 ::NFD (NFC);
 $tone = [\u0304\u0301\u030C\u0300\u0306] ;
-
-# Move the tone to the end of a syllable, and convert to number
-e {($tone) r} > r &tone-digit($1);
-($tone) ( [i o n u {o n} {n g}]) > $2 &tone-digit($1);
-($tone) > &tone-digit($1);
-
-# The following backs up until it finds the right vowel, then deposits the tone
-
-$vowel = [aAeEiIoOuUüÜ];
+e {($tone) r} → r &Pinyin-NumericPinyin($1);
+($tone) ( [i o n u {o n} {n g}]) → $2 &Pinyin-NumericPinyin($1);
+($tone) → &Pinyin-NumericPinyin($1);
+$vowel = [aAeEiIoOuU {u\u0308} {U\u0308} vV];
 $consonant = [[a-z A-Z] - [$vowel]];
 $digit = [1-5];
-$1 &digit-tone($3) $2 < ([aAeE]) ($vowel* $consonant*) ($digit);
-$1 &digit-tone($3) $2 < ([oO]) ([$vowel-[aeAE]]* $consonant*) ($digit);
-$1 &digit-tone($3) $2 < ($vowel) ($consonant*) ($digit);
-&digit-tone($1) < [:letter:] {($digit)};
-
+$1 &NumericPinyin-Pinyin($3) $2 ← ([aAeE]) ($vowel* $consonant*) ($digit);
+$1 &NumericPinyin-Pinyin($3) $2 ← ([oO]) ([$vowel-[aeAE]]* $consonant*) ($digit);
+$1 &NumericPinyin-Pinyin($3) $2 ← ($vowel) ($consonant*) ($digit);
+&NumericPinyin-Pinyin($1) ← [:letter:] {($digit)};
 ::NFC (NFD);
-
-
-