Skip to main content

PyCantonese: Cantonese Linguistics and NLP in Python

https://jacksonllee.com/logos/pycantonese-logo.png

Full Documentation: https://pycantonese.org


PyPI version Conda version

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

For Pyodide, install the WASM wheels (the .whl files with emscripten in the filename) from the GitHub releases of Rustling and PyCantonese.

Ready for more? Check out the Quickstart page.

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)

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

Metadata

Release files for pycantonese 4.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycantonese 4.1.0
File Size Uploaded Provenance Actions
pycantonese-4.1.0.tar.gz 39.0 MB With provenance Details for pycantonese-4.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pycantonese 4.1.0
File Actions
pycantonese-4.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for pycantonese-4.1.0-cp310-abi3-win_amd64.whl
pycantonese-4.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for pycantonese-4.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pycantonese-4.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for pycantonese-4.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
pycantonese-4.1.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for pycantonese-4.1.0-cp310-abi3-macosx_11_0_arm64.whl
pycantonese-4.1.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for pycantonese-4.1.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 245.8 MB

Release files / pycantonese-4.1.0.tar.gz

Download URL pycantonese-4.1.0.tar.gz
Size 39.0 MB
Tags Source
SHA-256 checksum
How to use checksums
f56cab5ac0b001ce95b614a9a5b6de75c35a1b625959c79195f64e257457e482
BLAKE2b-256 checksum
How to use checksums
524f81d3cde8479f567234b7a8d8e81896e089232fe1b2faad465ab151b04b90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 15, 2026.

Transparency log

Release files / pycantonese-4.1.0-cp310-abi3-win_amd64.whl

Download URL pycantonese-4.1.0-cp310-abi3-win_amd64.whl
Size 41.0 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
fa81d78e9242bec194fb1bf3febe6fd631b96fb26d1cd932031beab40d925034
BLAKE2b-256 checksum
How to use checksums
5813eafac15da6368654633644a7e70ab756226e8b531303bea4ef51423685d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 15, 2026.

Transparency log

Release files / pycantonese-4.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pycantonese-4.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 41.6 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
3c6a14a7407aa80fb6781eb08fcf7f1bb133227d83a31a7bc8b8be350cd8e9c8
BLAKE2b-256 checksum
How to use checksums
4b01ceba3e6dfd05db0ec4333b076dff51ef7fca7efe4e96789cfc1df5a68742
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 15, 2026.

Transparency log

Release files / pycantonese-4.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pycantonese-4.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 41.5 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2d1f8c0eb8c3f1017678529ef226ba3e8982c96701670705b800dcc60f81bf94
BLAKE2b-256 checksum
How to use checksums
6f3c40e9b20ed47cf20a458ed9f0d3cc75dddb30ab1dde7cde202d68b2ba314b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 15, 2026.

Transparency log

Release files / pycantonese-4.1.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL pycantonese-4.1.0-cp310-abi3-macosx_11_0_arm64.whl
Size 41.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2d061bdbee4b5748ff4caf8be1e72cd7e8bd720026c01ef1e7a609d158095d73
BLAKE2b-256 checksum
How to use checksums
8e02ef4cb6b8a26ea391a261f3406a42c568680036e557b570492bc5496d43df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 15, 2026.

Transparency log

Release files / pycantonese-4.1.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL pycantonese-4.1.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 41.4 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
af3cc2cb78134eee14fbc5d0a58404fd04f8e79a7f8ca290eb83a36812bf3e02
BLAKE2b-256 checksum
How to use checksums
cd5ed674817c9fd1a098683a2ca1b57255f9ca205b49c5b81619979602121f3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 15, 2026.

Transparency log

Security for pycantonese 4.1.0

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for pycantonese-4.1.0.tar.gz

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 Mar 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page