Skip to content

Conversation

@mingregister
Copy link

fix redundant empty str in chunks

sentence_count = 0
for sentence in sentences:
if len(chunk) + len(sentence + '\n') > chunk_size or sentence_count == max_i:
chunks.append(chunk.strip())
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the first time, enter this loop, chunk is '', so chunks will append a redundant empty str

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.

1 participant