Live data from Hacker News

Cantonese Font with Pronunciation

visual-fonts.com

21–30 of 206 posts

Re: Cantonese Font with Pronunciation

#21

As many have pointed here Mandarin, Thai, Cantonese and Vietnam are tonal languages and the meaning of words are depending on how you speak the syllables inside the words. Mandarin has four, Thai has five, Cantonese has six and Vitnamese has six tones. Overall about 20% or 1.5 billion of the world's population converse daily in tonal languages. It will be very helpful if someone come up with automatic tonal detection…

The annnoying part in written thai is thattherearenospacesbetweenwords.

Spaces between words is a relatively recent Irish invention (7th or 8th century) in western written language, so it’s not like it’s an obvious thing to have.

Re: Cantonese Font with Pronunciation

#22
post #18

As many have pointed here Mandarin, Thai, Cantonese and Vietnam are tonal languages and the meaning of words are depending on how you speak the syllables inside the words. Mandarin has four, Thai has five, Cantonese has six and Vitnamese has six tones. Overall about 20% or 1.5 billion of the world's population converse daily in tonal languages. It will be very helpful if someone come up with automatic tonal detection…

Isn't true that Cantonese has 9 tones?

It depends. Some people classify it as 6 tones, some as 9. The extra three are "entering level tone", which are sort of shortened versions of a different tone.

So: some words end in a stop, which is sometimes counted as a different tone even though the pitch pattern isn't different. For example, consider fan versus fat.

https://en.wikipedia.org/wiki/Checked_tone

Re: Cantonese Font with Pronunciation

#23
post #18

As many have pointed here Mandarin, Thai, Cantonese and Vietnam are tonal languages and the meaning of words are depending on how you speak the syllables inside the words. Mandarin has four, Thai has five, Cantonese has six and Vitnamese has six tones. Overall about 20% or 1.5 billion of the world's population converse daily in tonal languages. It will be very helpful if someone come up with automatic tonal detection…

Isn't true that Cantonese has 9 tones?

Yes and no. Cantonese has 9 tone categories that have 6 distinct tone contours. The 3 additional tones fall under the checked tone category (https://en.wikipedia.org/wiki/Checked_tone) for historical purposes, but their realized pronunciations coincide with the tone contours of 3 of the other 6 tones, so for most practical purposes, many sources describe Cantonese as having 6 tones.

I have an old Quora answer here that goes into more detail: https://qr.ae/pyNupi

Re: Cantonese Font with Pronunciation

#24

As many have pointed here Mandarin, Thai, Cantonese and Vietnam are tonal languages and the meaning of words are depending on how you speak the syllables inside the words. Mandarin has four, Thai has five, Cantonese has six and Vitnamese has six tones. Overall about 20% or 1.5 billion of the world's population converse daily in tonal languages. It will be very helpful if someone come up with automatic tonal detection…

The annnoying part in written thai is thattherearenospacesbetweenwords.

Same with Chinese language, thus lexing and parsing requires knowing many more words than in languages with spaces between words.

Re: Cantonese Font with Pronunciation

#25

Earlier quoted context omitted.

The annnoying part in written thai is thattherearenospacesbetweenwords.

Spaces between words is a relatively recent Irish invention (7th or 8th century) in western written language, so it’s not like it’s an obvious thing to have.

12 centuries should be plenty of time for a simple upgrade to improve the UX of a language.

Re: Cantonese Font with Pronunciation

#26

Earlier quoted context omitted.

Perhaps they use the same technology as ligatures? There could be a glyph for the standalone character, but also special glyphs for certain combos? The page says they do handle variations: Pronunciation in the Cantonese Font adapts to the context. Based on what comes before or after, the Jyutping romanization changes to the right one. The magic behind this is a careful curation from 100,000 contexts where the pronunc…

I've seen ligatures (or whatever the underlying feature is in font formats) used for some wild stuff, but this takes the cake. They're effectively encoding a small amount of natural language processing in a font. Setting aside for a minute the question of whether you _should_, I wonder how far you can take this? I.e. what limits are there on how much context you can take into account, etc.?

I think it also uses ligatures to render words from the "phrasebook", where you can take a word like "friend" and change the font from Times to this font, and it renders it as 朋友. Beautiful.

Re: Cantonese Font with Pronunciation

#27
post #5

Earlier quoted context omitted.

Mandarin absolutely does: * 行: xíng or háng * 的: de or dì * 长: cháng or zhǎng (plus I'm sure many more that I can't think of just right now)

Did it get more numerous with the adoption of simplified characters?

I'm not sure, but I believe that most, if not all, mergers from simplification were homophones.

Re: Cantonese Font with Pronunciation

#28
post #20

A friend of mine noticed the website thumbnail image is FizzBuzz but in classical Chinese.

The code in that image [1] is written in wenyang-lang [2], a programming language based on Classical Chinese.

It was previously featured on HN here: https://news.ycombinator.com/item?id=22213406

[1] https://visual-fonts.com/#jp-carousel-1092 [2] https://wy-lang.org/

Re: Cantonese Font with Pronunciation

#29
post #3

Something's not clear here to me, how does this handle words with multiple pronounciations using a font alone?

I am not a Cantonese speaker; however, in Mandarin, fonts with phonetic guidance are very common.

e.g., Hann-Tzong Wang's (王漢宗) free font collection[1] includes two typefaces with phonetic pronunciation guidance. These are wp{0..3}10-05.ttf and wp{0..3}10-08.ttf [2] As you can see from the filenames, there are actually four different font files for each of these two typefaces. The font files numbered {1..3} are for 「破音字」, characters with alternate pronunciation.

When a user types a word like 「給予」 (ㄐ一ˇㄩˇ/jǐ yǔ) for which there is an alternate, less-common pronunciation (ㄐ一ˇ/jǐ instead of ㄍㄟˇ/gěi for 給) they simply change the font for just the affected character to the variant with the correct pronunciation.

In the case of this Cantonese Font, the authors distribute a single .ttf (alongside a “phrasebook” .ttf whose purpose is not clear to me) and indicate in the Roadmap section of the website that ligature support must be enabled. If alternate pronunciations are common in Cantonese, then I suspect that they must use some ligature-based method. I would have to imagine there must be cases where this could be ambiguous, but I don't know how you would resolve those.

(In practice, just swapping the font on a single character works fairly well.)

[1] https://code.google.com/archive/p/wangfonts/

[2] https://dywang.csie.cyut.edu.tw/dywang/download/pdf/sample-o...

Re: Cantonese Font with Pronunciation

#30
post #24

Earlier quoted context omitted.

The annnoying part in written thai is thattherearenospacesbetweenwords.

Same with Chinese language, thus lexing and parsing requires knowing many more words than in languages with spaces between words.

As an English native speaker who learned Mandarin, I really didn't find the lack of spaces harmful to learning the language.

Since each character represents a syllable, rather than a specific sound, and the written language is essentially not phonetic, reading the characters is an entirely different experience.

OTOH, you have English and German and others that frequently use compound words, and the use of spaces becomes really important to understanding the writing.

I have zero experience with Thai.

Post reply on HN