Skip to content

Commit

Permalink
tutorial28
Browse files Browse the repository at this point in the history
  • Loading branch information
ronidas39 committed Jan 4, 2024
1 parent 46bbbfe commit ad4eea4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tutorial28/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from langchain.text_splitter import RecursiveCharacterTextSplitter
with open("sample.txt") as f1:
data=f1.read()
f1.close()

ts=RecursiveCharacterTextSplitter(chunk_size=100,chunk_overlap=20,length_function=len,is_separator_regex=False)
texts=ts.create_documents([data])
for text in texts:
print(text.page_content+"\n\n")
Binary file modified tutorial28/tutorial28.pptx
Binary file not shown.

0 comments on commit ad4eea4

Please sign in to comment.