Repository navigation
PyThaiNLP 5.4.0 adds new Thai pronunciation functions and a revision option for Hugging Face models. It also brings many bug fixes and safer corpus downloads and extraction. It is the first release to ship a software bill of materials (SBOM).
Highlights
- New
transliterate.pronunciate_pali()andtransliterate_wiktionary(). tokenize.deepcutnow runs on a built-in ONNX model, so it no longer needs TensorFlow.download()is safer: a failed download keeps the installed corpus,db.jsonis written atomically, and tar and zip extraction rejects escaping links.- Many functions no longer crash on valid input (
sound_syllable(),tone_detector(),puan(),check_klon(),thaiword_to_time()), andnighit()is more accurate.
Supply chain
- Each wheel embeds an SPDX 3 SBOM in
.dist-info/sboms/, as defined by PEP 770. The same file is attached to this release aspythainlp-5.4.0.spdx3.json. - The wheel, the source distribution, and the SBOM each have a Sigstore bundle and a GitHub artifact attestation (build provenance). To verify them, see Verify release files.
Behavior changes to note
tokenize.deepcutno longer appliescustom_dict.bleu_score()raisesValueErrorwhen the reference and hypothesis counts differ.nighit()requiresw1to end with "ํ".
Requires Python 3.9 or later. Upgrade with:
pip install --upgrade pythainlp
See the change log for details.
New Contributors
- @chanitnan0jr made their first contribution in #1400
- @zichen0116 made their first contribution in #1409
- @Sanjays2402 made their first contribution in #1473
- @Warit-Yuv made their first contribution in #1453
- @Palmkonde made their first contribution in #1503
- @thinandyavin-tech made their first contribution in #1534
Full Changelog: v5.3.8...v5.4.0