if current_chunk: chunks.append(current_chunk)
How to combine RBS-R with Latex OCR for mathematical PDFs. Have you tried recursive splitting? Share your chunking horror stories in the comments. rbs-r pdf
# Use the current level's delimiter delim = delimiters[level][0] splits = text.split(delim) if current_chunk: chunks