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

Obsolete/replace Tokenizer.Position to make stateless tokenizers possible #12

Closed
nblumhardt opened this issue Jul 6, 2017 · 0 comments

Comments

@nblumhardt
Copy link
Member

While not all tokenizers will end up being thread-safe, this property precludes any instance of Tokenizer<T> from being thread-safe.

Instead of storing the last-yielded token in a property on Tokenizer itself, an overload of Tokenize() could be provided that accepts an additional TokenizationState parameter, or, we could extract StatefulTokenizer out into a subclass of Tokenizer and push down the property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant