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

Improve tokenizer #51

Merged
merged 14 commits into from
Sep 8, 2024
Merged

Improve tokenizer #51

merged 14 commits into from
Sep 8, 2024

Conversation

xhluca
Copy link
Owner

@xhluca xhluca commented Sep 4, 2024

  • Closes On-the-fly stemming #31
  • Makes tokenizing queries much faster since we don't need to rebuild the vocab (can just use the existing vocab from the corpus

TODO

  • add better examples
    • Streaming via generator, and calling next
    • tokenize in int, ids, strings, tuple
    • show tokenizing corpus -> tokenize queries
  • add tests for BM25.retrieve under each possible condition:
    • Tokenized namedtuple
    • Object with ids and vocab
    • tuple (not Tokenized namedtuple) of ids and vocab
    • ids: List[List[int]]
    • strings: List[List[str]]
  • add tests for Tokenizer.tokenize, where it generates:
    • Tokenized namedtuple
    • Object with ids and vocab
    • tuple (not Tokenized namedtuple) of ids and vocab
    • ids: List[List[int]]
    • strings: List[List[str]]
  • add tests for Tokenizer.streaming_tokenize

@xhluca xhluca merged commit 0a49c62 into main Sep 8, 2024
2 checks passed
@xhluca xhluca deleted the improve-tokenizer branch September 8, 2024 04:58
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.

On-the-fly stemming
1 participant