Spaces:
Sleeping
Sleeping
Update src/text_processing.py
Browse files- src/text_processing.py +1 -1
src/text_processing.py
CHANGED
@@ -153,7 +153,7 @@ def text_processing(file_path, chunks, analysis_level='basic', writting_style='a
|
|
153 |
if sentence: # Kiểm tra nếu câu không rỗng
|
154 |
output_file = os.path.join(output_dir, f"{chunk_idx}_{sentence_idx}.txt") # Tên file dạng "chunkID_sentenceID.txt"
|
155 |
with open(output_file, "w", encoding="utf-8") as f:
|
156 |
-
f.write(sentence.replace("*","") + ".") # Giữ dấu chấm cuối câu
|
157 |
print(f"Đã lưu: {output_file}")
|
158 |
if __name__ == "__main__":
|
159 |
text_processing("phan-tich-hinh-tuong-nguoi-lai-do-song-da-2.pdf", chunks = 3)
|
|
|
153 |
if sentence: # Kiểm tra nếu câu không rỗng
|
154 |
output_file = os.path.join(output_dir, f"{chunk_idx}_{sentence_idx}.txt") # Tên file dạng "chunkID_sentenceID.txt"
|
155 |
with open(output_file, "w", encoding="utf-8") as f:
|
156 |
+
f.write(sentence.replace("*","").replace("#","") + ".") # Giữ dấu chấm cuối câu
|
157 |
print(f"Đã lưu: {output_file}")
|
158 |
if __name__ == "__main__":
|
159 |
text_processing("phan-tich-hinh-tuong-nguoi-lai-do-song-da-2.pdf", chunks = 3)
|