Skip to content

Sync main into dev and set version to 6.0.0-dev0 - #1569

Closed
bact wants to merge 35 commits into
PyThaiNLP:mainfrom
bact:sync-main-into-dev-5
Closed

bact wants to merge 35 commits into
PyThaiNLP:mainfrom
bact:sync-main-into-dev-5

Conversation

@bact

@bact bact commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Ignore this one.

What do these changes do

  • Merge main (5.4.0 release) into dev: bump files, Pitloom 0.20.2, ONNX metadata tool, release docs
  • CHANGELOG.md: [5.4.0] matches main; dev-only entries move to [Unreleased]
  • Set the dev version to 6.0.0-dev0; README version row stays at 5.4.0
  • Merge with a merge commit, not squash or rebase

What was wrong

How this fixes it

Fixes #...

Your checklist for this pull request

  • Passed code styles and structures
  • Passed code linting checks and unit test

wannaphong and others added 30 commits July 30, 2026 02:02
Add SPDX license information to fastthaig2p.py
Thai G2P v4 model is a Thai grapheme-to-phoneme Conversion model (Thai-to-IPA Conversion) that trained on pythainlp/thai-g2p-v4-dataset.

Hugging Face model and training script: https://huggingface.co/pythainlp/thaig2p-v4
`pythainlp.tokenize.attacut`,`pythainlp.tokenize.oskut`, and  `pythainlp.tokenize.sefr_cut`: migrated to use  [LEKCut](https://github.com/PyThaiNLP/LEKCut) (ONNX), removing legacy  `attacut` (PyTorch), `oskut` (TensorFlow), and `sefr_cut` (TensorFlow)
  package dependencies. The `segment()` APIs remain fully backward compatible.

Attacut tests moved from `tests/noauto_torch/` to `tests/noauto_onnx/`.
Add word tokenization evaluation metrics (`evaluate_word_tokenization`,  `word_eval_function`, `char_eval_function`, `TokenizationScore`) from SEFR CUT (`sefr_cut.evaluation`)  to `pythainlp.benchmarks`.
Change attacut, oskut, and sefr-cut to use LEKCut
Add word tokenization evaluation metrics from SEFR CUT
Remove pythainlp.generate.thai2fit, pythainlp.generate.wangchanglm, and pythainlp.chat
tcc() matched against text[p:], copying the rest of the text for every
character cluster. Match in place with pattern.match(text, p) instead.
This was ~93% of newmm's time on a 608,000-character input.

Co-Authored-By: Claude Code <noreply@anthropic.com>
CI on dev currently fails ruff, mypy, bandit, markdownlint and the
Python 3.9/3.10 unit tests, which hides real regressions in PRs.

- word_tokenization: drop "evaluation" from __all__ (no such name, so
  `from ... import *` raised AttributeError); narrow the input type in
  _normalize_evaluation_input with cast() instead of returning a union.
- wiktionary: only look up tone marks when a tone was found.
- wordtonum, ulmfit.document_vector: add missing annotations.
- fastthaig2p: rename `token` to `chunk` in _email_to_thai (bandit B105
  false positive on `token = ""`).
- tests: sort imports in test_fastthaig2p; remove an unused type: ignore;
  patch thaig2p_v4 through the module object, because on Python < 3.11
  mock.patch("pythainlp.transliterate.thaig2p_v4.transliterate") resolves
  "pythainlp.transliterate" to the re-exported function.
- CHANGELOG.md, corpus_license.md: fix markdownlint errors.

No behavior change intended.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Fix lint, type-check, bandit and markdownlint failures on dev
…c-slice-fix

Fix quadratic slowdown in tcc_p.tcc on long text
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Sync main into dev (docstring fixes, PR 1553)
bact added 5 commits October 8, 2026 02:32
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
- Bump pyproject.toml, __init__.py, CITATION.cff, codemeta.json
- Keep the README version row at the latest release
- Let bump-my-version skip README entries that do not match

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact added the documentation improve documentation and test cases label Oct 9, 2026
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@bact bact closed this Oct 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 74.329% — bact:sync-main-into-dev-5 into PyThaiNLP:main. No base build found for PyThaiNLP:main.

@bact
bact deleted the sync-main-into-dev-5 branch October 9, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation improve documentation and test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants