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

[FIX] start_index incorrect when chunk_overlap is not 0 (#116) #132

Merged
merged 11 commits into from
Jan 4, 2025

Conversation

bhavnicksm
Copy link
Collaborator

This pull request includes several changes to improve the chunking process in the TokenChunker class and update the associated tests. The most important changes involve modifying the chunk creation logic to handle overlapping tokens and updating the test suite to use a new tokenizer.

Improvements to chunk creation logic:

Updates to test suite:

Udayk02 and others added 11 commits January 2, 2025 18:08
- removed the unnecessary `join` as there is only one token_group.
- replaced `_decode_batch` with `_decode`
- `start_index` remains 0 when `chunk_overlap` is 0, fixed it.
- applies only when chunk_overlap > 0
- batch decoding for overlap texts
[FIX] #116: Incorrect`start_index` when `chunk_overlap` is not 0
@bhavnicksm bhavnicksm merged commit 4c09a64 into main Jan 4, 2025
6 checks passed
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.

2 participants