Full Documentation: https://pycantonese.org
PyCantonese is a Python library for Cantonese linguistics and natural language processing (NLP). Currently implemented features:
Accessing and searching corpus data
Parsing and conversion tools for Jyutping romanization
Parsing Cantonese text
Stop words
Word segmentation
Part-of-speech tagging
The design of PyCantonese prioritizes ease of use and linguistic knowledge. It has been successfully used by both academic and commercial organizations, including major US tech companies.
Since v4.0.0 (March 2026), PyCantonese depends on Rustling, a library for efficient CHAT data handling, word segmentation, and part-of-speech tagging.
Download and Install
Using pip:
pip install --upgrade pycantonese
Using conda:
conda install -c conda-forge pycantonese
PyCantonese also works in JavaScript.
Ready for more? Check out Quickstart.
Links
Author: Jackson L. Lee
Source code: https://github.com/jacksonllee/pycantonese
Social media: Facebook
How to Cite
Lee, Jackson L., Litong Chen, Charles Lam, Chaak Ming Lau, and Tsz-Him Tsui. 2022. PyCantonese: Cantonese Linguistics and NLP in Python. Proceedings of the 13th Language Resources and Evaluation Conference.
@inproceedings{lee-etal-2022-pycantonese,
title = "PyCantonese: Cantonese Linguistics and NLP in Python",
author = "Lee, Jackson L. and
Chen, Litong and
Lam, Charles and
Lau, Chaak Ming and
Tsui, Tsz-Him",
booktitle = "Proceedings of The 13th Language Resources and Evaluation Conference",
month = jun,
year = "2022",
publisher = "European Language Resources Association",
}
License
MIT License.
Please note that PyCantonese includes data from the following sources, all of which are permissively licensed:
Hong Kong Cantonese Corpus (CC BY)
CantoMap (GPL-3.0)
rime-cantonese (CC BY 4.0)
Common Voice Cantonese (Mozilla Public License 2.0)
Cantonese-Traditional Chinese Parallel Corpus (CC0 1.0 Universal)
For details about these datasets, please see their documentation.
Logo
The PyCantonese logo is the Chinese character 粵 meaning Cantonese, with artistic design by albino.snowman (Instagram handle).
Release files for pycantonese 5.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pycantonese-5.0.0.tar.gz | 39.6 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pycantonese-5.0.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| pycantonese-5.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| pycantonese-5.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| pycantonese-5.0.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| pycantonese-5.0.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 251.7 MB
Release files / pycantonese-5.0.0.tar.gz
| Download URL | pycantonese-5.0.0.tar.gz |
|---|---|
| Size | 39.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8655ba3cd891b528d6b070245abed55b20a08d673f1056fcf9afad0adbc47c1d
|
|
BLAKE2b-256 checksum How to use checksums |
090932e8000e39eb9ff034e1d55a86536a14abab90f2f4df176129fd90c43c29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency logRelease files / pycantonese-5.0.0-cp310-abi3-win_amd64.whl
| Download URL | pycantonese-5.0.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 42.1 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8f7bdc1e9a37b5e164cd57f22aecae8532d4d0b74ff5b6f5e28480a657fa53f9
|
|
BLAKE2b-256 checksum How to use checksums |
f3fdc13baa1362c377552644f3558759fc4b87557a9d9e3f7a030b25b897bfe3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency logRelease files / pycantonese-5.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pycantonese-5.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 42.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4a010973683fb8d14313ef44cdf7a4ded1adbe1a1bc64c93d0f75e65f141dd1a
|
|
BLAKE2b-256 checksum How to use checksums |
eefeee179a7336935d71d1db34183008a5362457d657e59c7a4c63e20c0b7852
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency logRelease files / pycantonese-5.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pycantonese-5.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 42.6 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
609d14a588cb0b39fe1644347609677dbda77e25978dfd34f1f9de455f88637b
|
|
BLAKE2b-256 checksum How to use checksums |
5670702c2edf2bd1dac56aef6236e30d977b83efe313e4a6b1ef9fa23004341a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency logRelease files / pycantonese-5.0.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | pycantonese-5.0.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 42.3 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b33d794ea43c8bb7e18699e561fa51a0f48dfb5a033d569b99b733b6ffc30917
|
|
BLAKE2b-256 checksum How to use checksums |
d8a9cbc19623761136d7c8f7230d633bc4735acf685f12da78662f4c24206bbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency logRelease files / pycantonese-5.0.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | pycantonese-5.0.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 42.5 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
587387ffe61969d95a5ee5f3f47eb74712c50e76dbc00d578dfb59b45934e3f5
|
|
BLAKE2b-256 checksum How to use checksums |
1e809b7163e41a460c7455026b7ff000ac8c75469ce8992a1f711bccf5759fbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency log