Skip to content

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

Open
phoneee wants to merge 1 commit intoPyThaiNLP:devfrom
phoneee:fix/word-detokenize-empty-string
Open

fix: handle empty strings and empty list in word_detokenize#1374
phoneee wants to merge 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
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: In progress

Development

Successfully merging this pull request may close these issues.

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

2 participants