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

Strings with linux line endings break the tokenizer #24

Open
palenshus opened this issue Jun 23, 2023 · 0 comments · May be fixed by #25
Open

Strings with linux line endings break the tokenizer #24

palenshus opened this issue Jun 23, 2023 · 0 comments · May be fixed by #25

Comments

@palenshus
Copy link

This causes an infinite loop:

var _tokenizer = new BertUncasedBaseTokenizer();
var sentence = "Linux\nline\nendings";
var tokens = _tokenizer.Tokenize(sentence);

The problem is that the TokenizeSentence method doesn't have '\n' as a valid token. It also has one space, and three spaces, but not two, for example.

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 a pull request may close this issue.

1 participant