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

support tokenize while keeping common censor chars #767

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

haileyok
Copy link
Contributor

There are some cases where it's useful to tokenize a string while not splitting on some non-letter chars like #, *, -, or _. Unfortunately right now Tokenize will split on all of these, making some matching difficult.

This just adds a second TokenizeTextSkippingCensorChars for those particular use cases. Also adding TokenizeTextWithRegex, so that other cases can be easily covered in the future if they arise.

@bnewbold bnewbold merged commit 25c72f5 into main Nov 5, 2024
7 checks passed
@bnewbold bnewbold deleted the hailey/tokenize-skip-censor-chars branch November 5, 2024 05:50
@TUNISIA-user
Copy link

hey

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.

3 participants