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