VietCat commited on
Commit
5baa302
·
1 Parent(s): f793012

update content_summary in chunking

Browse files
Files changed (1) hide show
  1. app/law_document_chunker.py +2 -2
app/law_document_chunker.py CHANGED
@@ -281,7 +281,7 @@ class LawDocumentChunker:
281
  summary = summary_response.strip() if summary_response else "Không có tóm tắt"
282
 
283
  # Tạo context_summary theo format yêu cầu
284
- context_summary = f"Structure: {level} | Chủ đề: Semantic: {summary}"
285
 
286
  return context_summary
287
 
@@ -297,7 +297,7 @@ class LawDocumentChunker:
297
  level_parts.append(f"Điều {metadata.article_number}")
298
 
299
  level = " ".join(reversed(level_parts)) if level_parts else "Nội dung"
300
- return f"Structure: {level} | Chủ đề: Semantic: Không có tóm tắt"
301
 
302
  def _split_into_chunks(self, text: str, chunk_size: int, overlap: int) -> List[str]:
303
  """Chia text thành các chunk với overlap."""
 
281
  summary = summary_response.strip() if summary_response else "Không có tóm tắt"
282
 
283
  # Tạo context_summary theo format yêu cầu
284
+ context_summary = f"Structure: {level} | Semantic: {summary}"
285
 
286
  return context_summary
287
 
 
297
  level_parts.append(f"Điều {metadata.article_number}")
298
 
299
  level = " ".join(reversed(level_parts)) if level_parts else "Nội dung"
300
+ return f"Structure: {level} | Semantic: Không có tóm tắt"
301
 
302
  def _split_into_chunks(self, text: str, chunk_size: int, overlap: int) -> List[str]:
303
  """Chia text thành các chunk với overlap."""