import re def chunk_text(text,chunk_size=300,overlap=50): words =text.split() chunks=[] i=0 while i500 else "")