update content_summary in chunking
Browse files
app/law_document_chunker.py
CHANGED
|
@@ -207,10 +207,9 @@ class LawDocumentChunker:
|
|
| 207 |
# Tìm tất cả ancestors từ index trước đó
|
| 208 |
for i in range(parent_index - 1, -1, -1):
|
| 209 |
chunk_id, level, level_value, content = chunk_stack[i]
|
| 210 |
-
ancestor_priority = level_priority.get(level, 999)
|
| 211 |
|
| 212 |
-
#
|
| 213 |
-
if
|
| 214 |
ancestors.append((level, level_value, content))
|
| 215 |
logger.debug(f"[CHUNKER] Found ancestor: {level} {level_value}")
|
| 216 |
|
|
|
|
| 207 |
# Tìm tất cả ancestors từ index trước đó
|
| 208 |
for i in range(parent_index - 1, -1, -1):
|
| 209 |
chunk_id, level, level_value, content = chunk_stack[i]
|
|
|
|
| 210 |
|
| 211 |
+
# Tìm tất cả chunks Điều/Khoản xuất hiện trước chunk hiện tại
|
| 212 |
+
if level in ["DIEU", "KHOAN"]:
|
| 213 |
ancestors.append((level, level_value, content))
|
| 214 |
logger.debug(f"[CHUNKER] Found ancestor: {level} {level_value}")
|
| 215 |
|