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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

haileyok
Copy link
Member

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.

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.

1 participant