diff --git a/backend/pipeline/entity_extractor.py b/backend/pipeline/entity_extractor.py index 253dcbc..33d74e8 100644 --- a/backend/pipeline/entity_extractor.py +++ b/backend/pipeline/entity_extractor.py @@ -33,45 +33,25 @@ PROMPT_DESCRIPTION = ( EXAMPLES = [ lx.data.ExampleData( - text=( - "建筑高度大于100m的公共建筑应设置避难层。避难层应采用耐火极限不低于3.00h的防火墙和甲级防火门进行分隔。" - "建筑内的消防控制室应采用耐火极限不低于2.00h的防火隔墙与乙级防火门与其他部位分隔。" - "疏散走道两侧的隔墙应采用不燃材料,其耐火极限不应低于1.00h。" - ), + text="公共建筑应设置防火墙。甲级防火门耐火极限为2.0h。消防控制室采用不燃材料。", extractions=[ lx.data.Extraction(extraction_class="场所", extraction_text="公共建筑"), - lx.data.Extraction(extraction_class="构件", extraction_text="避难层"), - lx.data.Extraction(extraction_class="指标", extraction_text="耐火极限不低于3.00h"), lx.data.Extraction(extraction_class="构件", extraction_text="防火墙"), lx.data.Extraction(extraction_class="构件", extraction_text="甲级防火门"), + lx.data.Extraction(extraction_class="指标", extraction_text="2.0h"), lx.data.Extraction(extraction_class="设施", extraction_text="消防控制室"), - lx.data.Extraction(extraction_class="指标", extraction_text="耐火极限不低于2.00h"), - lx.data.Extraction(extraction_class="构件", extraction_text="防火隔墙"), - lx.data.Extraction(extraction_class="构件", extraction_text="乙级防火门"), - lx.data.Extraction(extraction_class="构件", extraction_text="疏散走道"), - lx.data.Extraction(extraction_class="构件", extraction_text="隔墙"), lx.data.Extraction(extraction_class="材料", extraction_text="不燃材料"), - lx.data.Extraction(extraction_class="指标", extraction_text="耐火极限不应低于1.00h"), ], ), lx.data.ExampleData( - text=( - "住宅建筑室内消火栓设计流量不应小于5L/s。高位消防水箱有效容积不应小于18m3," - "且应设置在建筑最高部位。消防电梯前室应设置室内消火栓。" - "公共建筑内每个防火分区的安全出口不应少于2个。" - ), + text="住宅建筑应设室内消火栓。高位消防水箱容积为18m3。消防电梯前室设安全出口。", extractions=[ lx.data.Extraction(extraction_class="场所", extraction_text="住宅建筑"), lx.data.Extraction(extraction_class="设备", extraction_text="室内消火栓"), - lx.data.Extraction(extraction_class="指标", extraction_text="不应小于5L/s"), lx.data.Extraction(extraction_class="设备", extraction_text="高位消防水箱"), - lx.data.Extraction(extraction_class="指标", extraction_text="不应小于18m3"), + lx.data.Extraction(extraction_class="指标", extraction_text="18m3"), lx.data.Extraction(extraction_class="构件", extraction_text="消防电梯前室"), - lx.data.Extraction(extraction_class="设备", extraction_text="室内消火栓"), - lx.data.Extraction(extraction_class="场所", extraction_text="公共建筑"), - lx.data.Extraction(extraction_class="构件", extraction_text="防火分区"), lx.data.Extraction(extraction_class="构件", extraction_text="安全出口"), - lx.data.Extraction(extraction_class="指标", extraction_text="不应少于2个"), ], ), ] diff --git a/backend/services/indexing_service.py b/backend/services/indexing_service.py index d489974..c6fb7f5 100644 --- a/backend/services/indexing_service.py +++ b/backend/services/indexing_service.py @@ -218,7 +218,7 @@ def _run_pipeline(job_id: str) -> None: elapsed = round(time.time() - start_time, 1) stats = { - "blocks": len(content_list), + "blocks": total_pages if ext in ("txt",) else len(content_list), "block_types": block_types, "pages": total_pages, "raw_extractions": len(records),