Skip to main content

Cantonese Linguistics and NLP in Python

Project description

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

Full Documentation: https://pycantonese.org


PyPI version Supported Python versions CircleCI Builds

PyCantonese is a Python library for Cantonese linguistics and natural language processing (NLP). Currently implemented features (more to come!):

  • Accessing and searching corpus data

  • Parsing and conversion tools for Jyutping romanization

  • Parsing Cantonese text

  • Stop words

  • Word segmentation

  • Part-of-speech tagging

Download and Install

To download and install the stable, most recent version:

$ pip install --upgrade pycantonese

Ready for more? Check out the Quickstart page.

Consulting

If your team would like professional assistance in using PyCantonese, freelance consulting and training services are available for both academic and commercial groups. Please email Jackson L. Lee.

Support

If you have found PyCantonese useful and would like to offer support, buying me a coffee would go a long way!

How to Cite

PyCantonese is authored and maintained by Jackson L. Lee.

A talk introducing PyCantonese:

Lee, Jackson L. 2015. PyCantonese: Cantonese linguistic research in the age of big data. Talk at the Childhood Bilingualism Research Centre, Chinese University of Hong Kong. September 15. 2015. Notes+slides

License

MIT License. Please see LICENSE.txt in the GitHub source code for details.

The HKCanCor dataset included in PyCantonese is substantially modified from its source in terms of format. The original dataset has a CC BY license. Please see pycantonese/data/hkcancor/README.md in the GitHub source code for details.

The rime-cantonese data (release 2021.05.16) is incorporated into PyCantonese for word segmentation and characters-to-Jyutping conversion. This data has a CC BY 4.0 license. Please see pycantonese/data/rime_cantonese/README.md in the GitHub source code for details.

Acknowledgments

Wonderful resources with a permissive license that have been incorporated into PyCantonese:

  • HKCanCor

  • rime-cantonese

Individuals who have contributed feedback, bug reports, etc. (in alphabetical order of last names):

  • @cathug

  • Litong Chen

  • Jenny Chim

  • @g-traveller

  • Rachel Han

  • Ryan Lai

  • Charles Lam

  • Chaak Ming Lau

  • Hill Ma

  • @richielo

  • @rylanchiu

  • Stephan Stiller

  • Tsz-Him Tsui

  • Robin Yuen

Changelog

Please see CHANGELOG.md.

Setting up a Development Environment

The latest code under development is available on Github at jacksonllee/pycantonese. You need to have Git LFS installed on your system (run brew install git-lfs if you have Homebrew installed on MacOS, or run sudo apt-get install git-lfs if you’re on Ubuntu). To obtain this version for experimental features or for development:

$ git clone https://github.com/jacksonllee/pycantonese.git
$ cd pycantonese
$ git lfs pull
$ pip install -r dev-requirements.txt
$ pip install -e .

To run tests and styling checks:

$ pytest -vv --doctest-modules --cov=pycantonese pycantonese docs/source
$ flake8 pycantonese
$ black --check pycantonese

To build the documentation website files:

$ python docs/source/build_docs.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycantonese-3.4.0.tar.gz (3.8 MB view details)

Uploaded Source

Built Distribution

pycantonese-3.4.0-py3-none-any.whl (3.9 MB view details)

Uploaded Python 3

File details

Details for the file pycantonese-3.4.0.tar.gz.

File metadata

  • Download URL: pycantonese-3.4.0.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for pycantonese-3.4.0.tar.gz
Algorithm Hash digest
SHA256 8c0768bbfbc9862b9a149525edfd24dc34f380d5d654fae3597da3f0951a0752
MD5 70aea9b4210540826362d0ba9ae6a753
BLAKE2b-256 44284b0cbc503f0be6dd4c55306d85643a785f64cd733778a79d472c779eb491

See more details on using hashes here.

File details

Details for the file pycantonese-3.4.0-py3-none-any.whl.

File metadata

  • Download URL: pycantonese-3.4.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for pycantonese-3.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2585ae8070cc6a3a32f1cf0fd395c93f10aa531272e5292c4d082215104d7958
MD5 f4a0b519cd6f29010ddc2b56717f173b
BLAKE2b-256 d1b8bb21891cc1cc0466d15e211896b614c73b494434b837e326008b501851c0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page