pycantonese.jyutping_to_tipa

pycantonese.jyutping_to_tipa(jp: str | list[str]) list[str][source]

Convert Jyutping romanization into LaTeX TIPA.

Parameters:

jp (str or list[str]) – A Jyutping romanization string for a single word (any number of syllables, optionally separated by spaces), or a list of such strings carrying explicit word segmentation (one word per element).

Returns:

A list with one element per input word. Each element is the TIPA representation of that word, with syllables separated by a single space.

Return type:

list[str]

Raises:

ValueError – If the Jyutping romanization is illegal (e.g., with unrecognized elements).

Examples

>>> jyutping_to_tipa("gwong2dung1waa2")  # 廣東話, Cantonese
['k\super w ON25 tUN55 wa25']