Ahmed-Alghamdi commited on
Commit
921cdeb
·
verified ·
1 Parent(s): 2c2eced

Update document_processor.py

Browse files
Files changed (1) hide show
  1. document_processor.py +3 -3
document_processor.py CHANGED
@@ -7,7 +7,7 @@ from utils import clean_text, setup_logger
7
 
8
  logger = setup_logger('document_processor')
9
 
10
- def split_into_chunks(text, chunk_size=400, overlap=75):
11
  """
12
  Split text into overlapping chunks
13
 
@@ -48,7 +48,7 @@ def split_into_chunks(text, chunk_size=400, overlap=75):
48
 
49
  return chunks
50
 
51
- def load_documents(folder_path, chunk_size=400, overlap=75):
52
  """
53
  Load all .txt documents from folder and split them into chunks
54
 
@@ -102,7 +102,7 @@ def load_documents(folder_path, chunk_size=400, overlap=75):
102
 
103
  return df
104
 
105
- def load_single_document(file_path, chunk_size=400, overlap=75):
106
  """
107
  Load a single document and split it into chunks
108
 
 
7
 
8
  logger = setup_logger('document_processor')
9
 
10
+ def split_into_chunks(text, chunk_size=300, overlap=100):
11
  """
12
  Split text into overlapping chunks
13
 
 
48
 
49
  return chunks
50
 
51
+ def load_documents(folder_path, chunk_size=300, overlap=100):
52
  """
53
  Load all .txt documents from folder and split them into chunks
54
 
 
102
 
103
  return df
104
 
105
+ def load_single_document(file_path, chunk_size=300, overlap=100):
106
  """
107
  Load a single document and split it into chunks
108