Here is what I understand how chunks of fixed size with overlap is supposed to work. Take chunk_size = 100, chunk_overlap = 0.05 as an example.
The ending index is exclusive
chunk 0: 0 - 100
chunk 1: 95 - 195
chunk 2: 190 - 290
chunk 3: 285 - 385
It will keep advance. The range step size should (chunk_size - overlap_int). It’s 95 in this case. IMO, here is what the formula supposed to be:
for i in range(0, len(text_words), (chunk_size - overlap_int)):
chunk_words = text_words[i: i + chunk_size]
Let me know if that makes sense. Thanks.