Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tokenizer when no tokens #296

Merged
merged 4 commits into from
Oct 26, 2023
Merged

Conversation

julesbertrand
Copy link
Collaborator

@julesbertrand julesbertrand commented Oct 26, 2023

Description

When no tokens are retrieved for a text (e.g. preprocessing removed all words), then tokenizer is returning a ValueError about spacy lan_model not supported

  • the check for spacy lan_model should be done beforehand
  • if text is empty, tokens can be empty and should be returned as an empty list

+ Bump dependencies to latest available using poetry lock

Related Issue

Type of Change

  • 📚 Examples / docs / tutorials / dependencies update
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🔐 Security fix

Checklist

  • I've read the CODE_OF_CONDUCT.md document.
  • I've read the CONTRIBUTING.md guide.
  • I've updated the code style using make format-code.
  • I've written tests for all new methods and classes that I created.
  • I've written the docstring in Google format for all the methods and classes that I used.

@julesbertrand julesbertrand merged commit 9a66205 into main Oct 26, 2023
12 checks passed
@amaleelhamri amaleelhamri deleted the fix/tokenizer-when-no-tokens branch October 26, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants