Pycantonese

Latest version: v3.4.0

Safety actively analyzes 629564 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

3.2.1

Fixed
* Fixed character issues in the built-in HKCanCor data: 𠮩𠹌, 𠻗

3.2.0

Note: The underlying CHAT parser, the PyLangAcq package, has been bumped to v0.13.0.
All of the updates of PyLangAcq's CHAT reader apply to this PyCantonese release
as well. The details are in
[PyLangAcq's changelog for v0.13.0](https://github.com/jacksonllee/pylangacq/releases/tag/v0.13.0).
The changelog entries below only document updates specific to PyCantonese.

Added
* Defined the `Jyutping` class to better represent parsed Jyutping romanization.

Changed
* Bumped the PyLangAcq dependency to v0.13.0.
* The function `parse_jyutping` now returns a list of `Jyutping` objects,
rather than tuples of strings.

Deprecated

* The following methods in the ``CHATReader`` class have been deprecated:
- `character_sents` (use `characters` with `by_utterances=True` instead)
- `jyutping_sents` (use `jyutping` with `by_utterances=True` instead)

* The following arguments of the ``search`` method of ``CHATReader`` have been deprecated:
- `sent_range` (use `utterance_range` instead)
- `tagged` (use `by_tokens` instead)
- `sents` (use `by_utterances` instead)

Fixed
* Fixed the character issues in the built-in HKCanCor data: 𠺢, 𠺝, 𡁜, 𧕴, 𥊙, 𡃓, 𠴕, 𡀔

3.1.1

Fixed
* Pinned pylangacq at 0.12.0 (the new 0.13.0 has breaking changes).

3.1.0

Added
* Part-of-speech tagging:
- Added the function `pos_tag` that takes a segmented sentence or phrase
and returns its part-of-speech tags.
- Added the function `hkcancor_to_ud` that maps a part-of-speech tag
from the original HKCanCor annotated data to one of the tags from the
Universal Dependencies v2 tagset.
* Word segmentation:
- Improved segmentation quality by revising the underlying wordlist data.
* The test suite now covers code snippets in both the docstrings and `.rst` doc files.

Fixed
* Fixed the issue of not opening text files with UTF-8 encoding
(a possible issue on Windows).
* `jyutping_to_yale` and `parse_jyutping` now return a null value
(rather than raise an error) when the input is null.
* The word segmentation function `segment` now strips all whitespace
from the input unsegmented string before segmenting it.

3.0.0

Added
* Word segmentation:
- Segmentation is customizable for the following:
* Maximum word length
* A user-supplied list of words to allow as words
* A user-supplied list of words to disallow as words
- The default segmentation model has been improved with the rime-cantonese data (CC BY 4.0 license).
* Characters-to-Jyutping conversion:
- The conversion returns results in a word-segmented form.
- The conversion model has been improved with the rime-cantonese data (CC BY 4.0 license).
* Added the following functions; they are equivalent to their (now deprecated)
`x2y` counterparts:
- `characters_to_jyutping`
- `jyutping_to_tipa`
- `jyutping_to_yale`
* Added support for Python 3.9.

Changed

API-breaking Changes

* `jyutping_to_yale`: The default value of the keyword argument `as_list` has
been changed from `False` to `True`, so that this function is now more in
line with the other "jyutping_to_X" functions for returning a list.
* `characters_to_jyutping`: The returned valued is now a list of segmented words,
where each is a 2-tuple of (Cantonese characters, Jyutping).
Previously, it was a list of Jyutping strings for the individual
Cantonese characters.

Non-API-breaking Changes

* Switched documentation to the readthedocs theme and numpydoc docstring style.
* Improved CircleCI builds with orbs.

Deprecated
* The following `x2y` functions have been deprecated in favor of their
equivalents named in the form of `x_to_y`.
- `characters2jyutping`
- `jyutping2tipa`
- `jyutping2yale`

Security
- Turned on HTTPS for the pycantonese.org domain.

2.4.1

Fixed
* Switched to the `wordseg` dependency to a PyPI source instead of a
GitHub direct link.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.