13-05-2026, 11:33 PM
(This post was last modified: 13-05-2026, 11:38 PM by Jorge_Stolfi.)
(13-05-2026, 10:59 PM)oshfdk wrote: You are not allowed to view links. Register or Login to view.As I said, I haven't tested anything yet, for the test I need a suggestion of the central character and the word separation algorithm.
The words in that pinyin file are already separated by spaces or ascii punctuation.
Each pinyin syllable is zero or more consonants (which include "y" or "w"), one or more vowels, and an optional final "-n", "-ng", or (rarely) "-r".
For the core, you could use the vowel that has a tone diacritic. For example
- "chuáng" = «chu-á-ng»"
- "liǎo" = «li-ǎ-o»
- "shuǐ" = «shu-í-»
- "nián" = «ni-á-n»"
- "hǎo" = «h-ǎ-o»
- "áo" = «-á-o»
- "uò" = «u-ò-»
- "è" = «-è-»
In that file there are a handful of words without any diacritics. I suppose you can just discard them.
All the best, --stolfi

