XThomasBU commited on
Commit
71b8a7a
1 Parent(s): 57b7b8d
Files changed (1) hide show
  1. code/modules/data_loader.py +1 -4
code/modules/data_loader.py CHANGED
@@ -108,9 +108,6 @@ class FileReader:
108
  class ChunkProcessor:
109
  def __init__(self, config):
110
  self.config = config
111
- self.remove_leftover_delimiters = config["splitter_options"][
112
- "remove_leftover_delimiters"
113
- ]
114
  self.document_chunks_full = []
115
  self.document_names = []
116
 
@@ -155,7 +152,7 @@ class ChunkProcessor:
155
  else:
156
  document_chunks = documents
157
 
158
- if self.remove_leftover_delimiters:
159
  document_chunks = self.remove_delimiters(document_chunks)
160
  if self.config["splitter_options"]["remove_chunks"]:
161
  document_chunks = self.remove_chunks(document_chunks)
 
108
  class ChunkProcessor:
109
  def __init__(self, config):
110
  self.config = config
 
 
 
111
  self.document_chunks_full = []
112
  self.document_names = []
113
 
 
152
  else:
153
  document_chunks = documents
154
 
155
+ if self.config["splitter_options"]["remove_leftover_delimiters"]:
156
  document_chunks = self.remove_delimiters(document_chunks)
157
  if self.config["splitter_options"]["remove_chunks"]:
158
  document_chunks = self.remove_chunks(document_chunks)