Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
fb0b957
Bump actions/download-artifact from 7 to 8
dependabot[bot] Mar 5, 2026
de3a094
Bump epitran from 1.26.0 to 1.35.1
dependabot[bot] Jun 25, 2026
eaf5e04
Bump budoux from 0.7.0 to 0.8.4
dependabot[bot] Jun 25, 2026
90e3b9e
Bump transformers from 4.57.6 to 5.12.1
dependabot[bot] Jun 25, 2026
a7cd642
Bump actions/setup-python from 6 to 6.2.0
dependabot[bot] Jun 25, 2026
4ad8bd3
Bump actions/checkout from 6.0.2 to 7.0.0
dependabot[bot] Jun 25, 2026
3973e71
Merge pull request #1440 from PyThaiNLP/dependabot/pip/budoux-0.8.4
bact Jun 25, 2026
7efb999
Merge pull request #1443 from PyThaiNLP/dependabot/github_actions/act…
bact Jun 25, 2026
a052cf3
Merge pull request #1442 from PyThaiNLP/dependabot/github_actions/act…
bact Jun 25, 2026
6a2d380
Merge pull request #1441 from PyThaiNLP/dependabot/pip/transformers-5…
bact Jun 25, 2026
9bd4d92
Merge pull request #1439 from PyThaiNLP/dependabot/pip/epitran-1.35.1
bact Jun 25, 2026
6694a82
Bump epitran from 1.35.1 to 1.35.2
dependabot[bot] Jul 2, 2026
f636a16
Merge pull request #1445 from PyThaiNLP/dependabot/pip/epitran-1.35.2
bact Jul 2, 2026
1395243
Bump astral-sh/ruff-action from 3 to 4.0.0
dependabot[bot] Jul 9, 2026
2d722bc
Bump github/codeql-action from 4.36.2 to 4.36.3
dependabot[bot] Jul 9, 2026
ed8d6fc
Merge pull request #1447 from PyThaiNLP/dependabot/github_actions/ast…
bact Jul 10, 2026
bacdccf
Merge pull request #1448 from PyThaiNLP/dependabot/github_actions/git…
bact Jul 11, 2026
869b01b
Bump actions/stale from 10.3.0 to 10.4.0
dependabot[bot] Jul 16, 2026
55f7ab6
Bump transformers from 5.12.1 to 5.13.0
dependabot[bot] Jul 16, 2026
61e47f6
Bump github/codeql-action from 4.36.3 to 4.37.0
dependabot[bot] Jul 16, 2026
8d537e7
Bump astral-sh/ruff-action from 4.0.0 to 4.1.0
dependabot[bot] Jul 16, 2026
146a46a
Merge pull request #1452 from PyThaiNLP/dependabot/github_actions/ast…
bact Jul 16, 2026
ef2c6c1
Merge pull request #1451 from PyThaiNLP/dependabot/github_actions/git…
bact Jul 16, 2026
80d44b0
Merge pull request #1449 from PyThaiNLP/dependabot/github_actions/act…
bact Jul 16, 2026
39204ee
Merge pull request #1450 from PyThaiNLP/dependabot/pip/transformers-5…
bact Jul 16, 2026
309e8d9
Bump transformers from 5.13.0 to 5.14.1
dependabot[bot] Jul 23, 2026
acd1bcd
Bump dieghernan/cff-validator from 5.0.1 to 5.1.1
dependabot[bot] Jul 23, 2026
fdaf204
Bump DavidAnson/markdownlint-cli2-action from 23.2.0 to 24.0.0
dependabot[bot] Jul 23, 2026
31358ac
Bump sentencepiece from 0.2.1 to 0.2.2
dependabot[bot] Jul 23, 2026
1a95f4e
Bump symspellpy from 6.9.0 to 6.10.0
dependabot[bot] Jul 23, 2026
690c5fb
Bump github/codeql-action from 4.37.0 to 4.37.1
dependabot[bot] Jul 23, 2026
3b4994b
Merge pull request #1456 from PyThaiNLP/dependabot/github_actions/Dav…
bact Jul 23, 2026
1fa56f6
Merge pull request #1455 from PyThaiNLP/dependabot/github_actions/die…
bact Jul 23, 2026
2c6e1b1
Merge pull request #1454 from PyThaiNLP/dependabot/pip/transformers-5…
bact Jul 23, 2026
28e749f
Merge pull request #1458 from PyThaiNLP/dependabot/pip/symspellpy-6.10.0
bact Jul 23, 2026
a230186
Merge pull request #1457 from PyThaiNLP/dependabot/pip/sentencepiece-…
bact Jul 23, 2026
add752e
Merge pull request #1459 from PyThaiNLP/dependabot/github_actions/git…
bact Jul 23, 2026
2b0f652
Merge pull request #1304 from PyThaiNLP/dependabot/github_actions/act…
bact Jul 27, 2026
681e02c
Change loop limit from 20 to dec_maxlen
wannaphong Jul 29, 2026
a17dd90
Merge pull request #1464 from PyThaiNLP/fix-1462
wannaphong Jul 29, 2026
08b2788
Patch #1409
wannaphong Jul 29, 2026
0eccebb
Patch #1400
wannaphong Jul 29, 2026
f1b633e
Patch #1464
wannaphong Jul 29, 2026
e24ccde
Patch #1380
wannaphong Jul 29, 2026
8675a58
PyThaiNLP v5.3.5
wannaphong Jul 29, 2026
ac36e0b
Update CITATION.cff from codemeta.json
wannaphong Jul 29, 2026
dbbe7ea
Update pyproject.toml
wannaphong Jul 29, 2026
908ca2f
Merge branch 'v5.3' of https://github.com/PyThaiNLP/pythainlp into v5.3
wannaphong Jul 29, 2026
38195b0
Merge pull request #1465 from PyThaiNLP/v5.3
wannaphong Jul 29, 2026
22f2447
Merge branch 'dev' into main
wannaphong Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
uses: actions/checkout@v7.0.0

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v6.2.0
with:
python-version: "3.x"
cache: "pip"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codemeta2cff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0

- name: Generate CITATION.cff from codemeta.json
uses: caltechlibrary/codemeta2cff@99ce10831c3037a067c3d9551d455638e0b438ac #v0.3.3
Expand All @@ -37,7 +37,7 @@ jobs:
printf '\n```' >> $GITHUB_STEP_SUMMARY

- name: Validate CITATION.cff
uses: dieghernan/cff-validator@54c8e737314b948f25c0e5524a9d8ae3f39b207b #v5.0.1
uses: dieghernan/cff-validator@d8f85828214016ce6976e740b6e0504c0fdc4dbb #v5.1.1

- name: Commit and push updated CITATION.cff
uses: EndBug/add-and-commit@290ea2c423ad77ca9c62ae0f5b224379612c0321 #v10.0.0
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4.36.2
uses: github/codeql-action/init@v4.37.1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -77,7 +77,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v4.36.2
uses: github/codeql-action/autobuild@v4.37.1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -91,4 +91,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4.36.2
uses: github/codeql-action/analyze@v4.37.1
4 changes: 2 additions & 2 deletions .github/workflows/corpus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v6.2.0
with:
python-version: "3.13"
cache: "pip"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v6.2.0
with:
python-version: "3.12"
- name: Install build tools and doc build tools
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0
- name: Ruff
uses: astral-sh/ruff-action@v3
uses: astral-sh/ruff-action@v4.1.0
with:
src: "./pythainlp ./tests ./examples"
args: check --verbose --config pyproject.toml
4 changes: 2 additions & 2 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6.0.3
- uses: actions/checkout@v7.0.0
with:
fetch-depth: 0

- uses: DavidAnson/markdownlint-cli2-action@v23.2.0
- uses: DavidAnson/markdownlint-cli2-action@v24.0.0
with:
globs: |
**/*.md
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v6.2.0
with:
python-version: "3.9"
cache: "pip"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-versioned-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,26 @@ jobs:
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"

- name: Checkout pythainlp (for scripts)
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0
with:
path: pythainlp

- name: Checkout dev-docs repository
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0
with:
repository: PyThaiNLP/dev-docs
token: ${{ secrets.PERSONAL_TOKEN }}
path: dev-docs

- name: Checkout docs repository
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0
with:
repository: PyThaiNLP/docs
token: ${{ secrets.PERSONAL_TOKEN }}
path: docs

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v6.2.0
with:
python-version: "3.12"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
build: ${{ steps.check_build_trigger.outputs.build }}
steps:
- name: Checkout source code
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: check_build_trigger
Expand All @@ -71,10 +71,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -100,7 +100,7 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Retrieve distributions
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
name: artifact
path: dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v6.0.3
- uses: actions/checkout@v7.0.0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: "Check PRs"
uses: actions/stale@v10.3.0
uses: actions/stale@v10.4.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity.'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6.0.3
uses: actions/checkout@v7.0.0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ and this project adheres to

- Improve guardrails in `check_sara()` and `nighit()`

## [5.3.5] - 2026-07-30

### Fixed

- Change loop limit from 20 to dec_maxlen #1464
- fix: remove duplicate .replace mid-tone in _clean_ipa #1409
- Fix: CodeQL ReDoS vulnerability in ULMFiT replace_url #1400
- fix: remove unconditional overwrite that disables teacher forcing in Seq2Seq #1380

## [5.3.4] - 2026-04-02

### Fixed
Expand Down Expand Up @@ -308,6 +317,7 @@ The minimum requirement is now Python 3.9.

- See <https://github.com/PyThaiNLP/pythainlp/releases/tag/v5.0.0>

[5.3.5]: https://github.com/PyThaiNLP/pythainlp/compare/v5.3.5...v5.3.5
[5.3.4]: https://github.com/PyThaiNLP/pythainlp/compare/v5.3.3...v5.3.4
[5.3.3]: https://github.com/PyThaiNLP/pythainlp/compare/v5.3.2...v5.3.3
[5.3.2]: https://github.com/PyThaiNLP/pythainlp/compare/v5.3.1...v5.3.2
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract: PyThaiNLP is a Thai natural language processing library for Python. It
repository-code: "https://github.com/PyThaiNLP/pythainlp"
type: software
doi: 10.5281/zenodo.3519354
version: 5.3.4
version: 5.3.5
license-url: "https://spdx.org/licenses/Apache-2.0"
keywords:
- computational linguistics
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ pip install pythainlp

| Version | Python version | Changes | Documentation |
|:-------:|:--------------:|:-------:|:-------------:|
| [5.3.4](https://github.com/PyThaiNLP/pythainlp/releases) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/blob/dev/CHANGELOG.md#533---2026-03-26) | [pythainlp.org/docs](https://pythainlp.org/docs) |
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/compare/v5.3.4...HEAD) | [pythainlp.org/dev-docs](https://pythainlp.org/dev-docs/) |
| [5.3.5](https://github.com/PyThaiNLP/pythainlp/releases) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/blob/dev/CHANGELOG.md) | [pythainlp.org/docs](https://pythainlp.org/docs) |
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/compare/v5.3.5...HEAD) | [pythainlp.org/dev-docs](https://pythainlp.org/dev-docs/) |

## Features

Expand Down
4 changes: 2 additions & 2 deletions README_TH.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ pip install pythainlp

| รุ่น | รุ่นของ Python | มีอะไรเปลี่ยน | เอกสาร |
| :-: | :-: | :-: | :-: |
| [5.3.4](https://github.com/PyThaiNLP/pythainlp/releases) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/blob/dev/CHANGELOG.md#533---2026-03-26) | [pythainlp.org/docs](https://pythainlp.org/docs) |
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/compare/v5.3.4...HEAD) | [pythainlp.org/dev-docs](https://pythainlp.org/dev-docs/) |
| [5.3.5](https://github.com/PyThaiNLP/pythainlp/releases) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/blob/dev/CHANGELOG.md) | [pythainlp.org/docs](https://pythainlp.org/docs) |
| [`dev`](https://github.com/PyThaiNLP/pythainlp/tree/dev) | 3.9+ | [Log](https://github.com/PyThaiNLP/pythainlp/compare/v5.3.5...HEAD) | [pythainlp.org/dev-docs](https://pythainlp.org/dev-docs/) |

## ความสามารถ

Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,5 @@
"https://pythainlp.org/Model-Cards/"
],
"url": "https://pythainlp.org/",
"version": "5.3.4"
"version": "5.3.5"
}
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "hatchling.build"

[project]
name = "pythainlp"
version = "5.3.4"
version = "5.3.5"
description = "Thai Natural Language Processing library"
readme = "README.md"
requires-python = ">=3.9"
Expand Down Expand Up @@ -269,16 +269,16 @@ full = [
"PyYAML>=5.4.1,<6.0.2",
"sacremoses==0.1.1",
"sentence-transformers>=2.7.0,<3",
"sentencepiece==0.2.1",
"sentencepiece==0.2.2",
"spacy==3.8.7,<4",
"spacy_thai==0.7.8",
"ssg==0.0.8",
"sefr_cut>=1.1",
"symspellpy==6.9.0",
"symspellpy==6.10.0",
"thai-nner==0.3",
"tltk>=1.10,<2",
"torch>=1.13.1,<3",
"transformers==4.57.6",
"transformers==5.14.1",
"ufal.chu-liu-edmonds==1.0.3",
"word2word>=1.0.0,<2",
"wtpsplit==1.3.0",
Expand Down Expand Up @@ -315,7 +315,7 @@ include = [
skips = ["B110"]

[tool.bumpversion]
current_version = "5.3.4"
current_version = "5.3.5"
commit = true
tag = true
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(\\-(?P<release>[a-z]+)(?P<build>\\d+))?"
Expand Down
2 changes: 1 addition & 1 deletion pythainlp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: Apache-2.0
__version__ = "5.3.4"
__version__ = "5.3.5"

thai_consonants: str = (
"กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรลวศษสหฬอฮ" # 44 chars
Expand Down
2 changes: 1 addition & 1 deletion pythainlp/transliterate/w2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def _predict(self, word: str) -> str:
h = last_hidden

preds: list[int] = []
for _ in range(20):
for _ in range(hp.dec_maxlen):
h = self._grucell(
dec,
h,
Expand Down
Loading