#! /bin/sed -f # Last edited on 2026-06-01 21:16:21 by stolfi # # Reads a pinyin file, assumed to be all lowercase, in Unicode UTF-8 # encoding. Writes the same after converting every vowel with a pinyin # tone diacritic into the corresponding plain vowel. # # Note that 'ü' is a plain vowel, and it can take tone diacritics, # like 'ǚ'. s:ā:a:g s:ē:e:g s:ī:i:g s:ō:o:g s:ū:u:g s:ǖ:ü:g s:á:a:g s:é:e:g s:í:i:g s:ó:o:g s:ú:u:g s:ǘ:ü:g s:à:a:g s:è:e:g s:ì:i:g s:ò:o:g s:ù:u:g s:ǜ:ü:g s:ǎ:a:g s:ě:e:g s:ǐ:i:g s:ǒ:o:g s:ǔ:u:g s:ǚ:ü:g