From dbc2a8689abc9a5fc128b6d6df56a2d12f9974d8 Mon Sep 17 00:00:00 2001 From: Yongteng Lei Date: Tue, 15 Jul 2025 13:01:56 +0800 Subject: [PATCH] Fix: no chunks parsed out for Law (#8842) ### What problem does this PR solve? Fixes no chunks parsed out for Law. #5113 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/nlp/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rag/nlp/__init__.py b/rag/nlp/__init__.py index fd302fac3..e54eb96b6 100644 --- a/rag/nlp/__init__.py +++ b/rag/nlp/__init__.py @@ -210,6 +210,7 @@ def bullets_category(sections): hits = [0] * len(BULLET_PATTERN) for i, pro in enumerate(BULLET_PATTERN): for sec in sections: + sec = sec.strip() for p in pro: if re.match(p, sec) and not not_bullet(sec): hits[i] += 1