RecursiveCharacterTextSplitter
split
首先是调用了 Python 的 re.split(sep, text)
做了一次基本的分割,同时用 [s for s in re.split(sep, text) if s != ""]
做基础的过滤,过滤掉那些为空的字符串。
merge
然后针对切割出来的块进行 merge
RecursiveCharacterTextSplitter
首先是调用了 Python 的 re.split(sep, text)
做了一次基本的分割,同时用 [s for s in re.split(sep, text) if s != ""]
做基础的过滤,过滤掉那些为空的字符串。
然后针对切割出来的块进行 merge