Update utils.py
Browse files
utils.py
CHANGED
@@ -331,7 +331,7 @@ def document_loading_splitting():
|
|
331 |
#docs.extend(loader.load())
|
332 |
|
333 |
|
334 |
-
# Vorverarbeitung der Dokumente
|
335 |
preprocessed_docs = []
|
336 |
for doc in docs:
|
337 |
preprocessed_content = preprocess_text(doc.page_content)
|
@@ -341,7 +341,8 @@ def document_loading_splitting():
|
|
341 |
"page": doc.metadata["page"],
|
342 |
"path": doc.metadata["path"]
|
343 |
}
|
344 |
-
preprocessed_docs.append(Document(
|
|
|
345 |
|
346 |
################################
|
347 |
# Document splitting
|
|
|
331 |
#docs.extend(loader.load())
|
332 |
|
333 |
|
334 |
+
# Vorverarbeitung der Dokumente
|
335 |
preprocessed_docs = []
|
336 |
for doc in docs:
|
337 |
preprocessed_content = preprocess_text(doc.page_content)
|
|
|
341 |
"page": doc.metadata["page"],
|
342 |
"path": doc.metadata["path"]
|
343 |
}
|
344 |
+
preprocessed_docs.append(Document(content=preprocessed_content, title=preprocessed_metadata["title"], page=preprocessed_metadata["page"], path=preprocessed_metadata["path"]))
|
345 |
+
|
346 |
|
347 |
################################
|
348 |
# Document splitting
|