Live data from Hacker News

Cantonese Font with Pronunciation

visual-fonts.com

111–120 of 206 posts

Re: Cantonese Font with Pronunciation

#111

Earlier quoted context omitted.

Hong Kong Cantonese has six tones. I knew it was different for Guangzhou Cantonese, but I wasn't sure exactly how many, so here's what Wikipedia says: > In finals that end in a stop consonant, the number of tones is reduced to three; in Chinese descriptions, these "checked tones" are treated separately by diachronic convention, so that Cantonese is traditionally said to have nine tones. However, phonetically these ar…

Yeah, the seventh tone in Guangzhou Cantonese that’s gone in Hong Kong Cantonese is the high-falling tone. In Guangzhou Cantonese, 衫 (shirt) and 三 (three) are not homophones, but they are in Hong Kong Cantonese. The Jyutping romanization (from the Linguistic Society of Hong Kong) reflects this change in HK Cantonese (saam1), whereas Yale, based on the older pronunciation, could represent the difference in tone (sāam…

I suspect the difference is more "academic" than otherwise.

It would be interesting to give a Hong-Konger a test with pairs of characters, one of 1st tone and the other 7th tone, and see whether they can guess which is which.

I suspect with minimal training they'd be able to score significantly better than random chance. (Willing to try it out!)

Re: Cantonese Font with Pronunciation

#113

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…

I've learned to speak some Mandarin. What helped me a lot while talking is using Google's Translate function to see if I get the tone right.

It's free and fast. It's very helpful when you want quick feedback.

I learned a lot from it about the pronunciation of consonants as well. The k-sound has way more air in it. You need to pronounce it as "kh". Same thing with the t-sound.

I just came back from a trip to China and it was noticeable how much more people understood me. Still need to work on vocabulary though...

Re: Cantonese Font with Pronunciation

#114
post #3

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

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…

Hello. Font's author here. You and Jeff are correct in guessing this is (ab)using ligatures maximally :) To satisfy your curiosity, we can go deeper.

----

Conceptually it is simple: 1. assign a default (most likely) sound for each character, 2. loop through contexts, extracting words (char-combos) where the sound is different from the default ("alt-word") 3. create SVGs + font-paths (fallback for incompatible systems) for every char and every alt-word 4. assign a ligature to substitute each char-sequence that forms the alt-word (e.g., "when 乾 隆 appears adjacently, replace with `uniF1234` (the codepoint for the alt-word 乾隆")

It is not perfect, but I didn't expect this to work so well, and was stunned when the testers report high accuracy. I have always believed that bespoke computation with word segmentation (with some 1M frequency attached library) and large data-bank (100k+ words) was necessary.

----

Practically it was horrific, tedious, mind-numbing, gawd-awful set of "why this doesn't work": 1. SVG automation that works for 10^3 breaks with 10^5 2. what worked for Latin breaks for unicode 3. what worked for unicode breaks for PUA 4. what worked for monochrome breaks for color 5. what worked for single glyphs breaks for ligatures 6. what?! The assignments in the database is wrong?? 7. [...]

As I was trying to coerce the system to do what it wasn't designed to do, many of these breaks are undocumented, pretty mysterious to solve, and some steps just got manually gritted through. (And each of the 15k+ glyphs got gritted through about five times.)

It does look pretty elegant at the end ;)

Re: Cantonese Font with Pronunciation

#115
post #106

Earlier quoted context omitted.

I got curious about something with tonal languages: how are song melodies written for them. For some, the melody matched the tones of the word. Then there's Mandarin. Mandarin just follows the melody, and you can figure out the word by context. As an English speaker, this makes ~cents~ sense. Homophones aren't a big deal. If Mandarin doesn't need tones in lyrics, why does it need them normally?

Tangential fact - while, as you described, most popular songs in Cantonese have tones matching the melody (usually the melody is written first, then lyrics are filled in), many songs from Christian churches don't follow this practice. (I don't know why, maybe a lack of lyricists for translation from English/Latin to Cantonese during earlier years?) So, in Hong Kong, when somebody writes a song/lyric that doesn't quit…

> many songs from Christian churches don't follow this practice. (I don't know why, maybe a lack of lyricists for translation from English/Latin to Cantonese during earlier years?)

If you want the Cantonese lyrics to be translations of English lyrics, it severely limit the words you can choose, to the point it is impossible to fully match the melody.

Re: Cantonese Font with Pronunciation

#116

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.?

(Font author)

This is all off the beaten path, so I suspect the answer is no one knows. Font tables have a limit of 65k characters, but this ceiling can be busted in whacky ways using multiple lookups, useExtension... Practically, font building tools / operations crash (mysteriously), stalls (mysteriously), or slows to a crawl (indistinguishable from stalling), and the Cantonese Font about pushes the limit.

Re: Cantonese Font with Pronunciation

#117
post #68

I really like this idea, though I haven't tried it yet. Spotify has lyrics for many songs, but for characters the first hurdle is you cannot really sing along even with the lyrics unless you know them. Is there some easy way one change the font used by Spotify to be this font somehow?

(Font author) I have tried, but I couldn't find a way to change font in Spotify app. If you find a way I'd love to know.

Re: Cantonese Font with Pronunciation

#119

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…

There was a post on HN recently about the demise of speech recognition: https://news.ycombinator.com/item?id=35800935 That said, I still think your post raises some excellent points. To refine it, how about an online learning app that plays a sound or video clip from a national news TV or radio program. (Usually, the speakers have perfect pronunciation.) You repeat the words; the online app records it; then, it shows…

This article is from 2010, and it says that as of 2010, progress on speech recognition flatlined since 2001

Is this still the case?

How does 2001 software compares to 2023 software? Or 2010 to 2023 for that matter

Re: Cantonese Font with Pronunciation

#120

I see it, I understand what's going on - it's clear, but I still cannot read it. How do you read those pronunciations?

For a rough guide of the sounds, the pronunciation key in Wikipedia does a good enough job.

https://en.wikipedia.org/wiki/Help:IPA/Cantonese

Post reply on HN