Skip to content

fix: handle empty strings and empty list in word_detokenize#1374

Merged
bact merged 1 commit intoPyThaiNLP:devfrom
phoneee:fix/word-detokenize-empty-string
Mar 30, 2026
Merged

fix: handle empty strings and empty list in word_detokenize#1374
bact merged 1 commit intoPyThaiNLP:devfrom
phoneee:fix/word-detokenize-empty-string

Conversation

@phoneee
Copy link
Copy Markdown
Contributor

@phoneee phoneee commented Mar 29, 2026

What do these changes do

Fix word_detokenize crashing on empty list and empty string tokens

Fixes #1373

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

fix: guard word_detokenize against empty list input
@sonarqubecloud
Copy link
Copy Markdown

@bact bact added the bug bugs in the library label Mar 29, 2026
@bact bact added this to PyThaiNLP Mar 29, 2026
Copy link
Copy Markdown
Member

@bact bact left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

@bact bact moved this to In progress in PyThaiNLP Mar 29, 2026
@bact bact merged commit 2710adc into PyThaiNLP:dev Mar 30, 2026
27 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in PyThaiNLP Mar 30, 2026
@phoneee phoneee deleted the fix/word-detokenize-empty-string branch March 31, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug bugs in the library

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: word_detokenize and sent_tokenize crash on edge-case list inputs

2 participants