From 0d359aab26b881cdee42cbfb4f0cc4cb039b56b5 Mon Sep 17 00:00:00 2001 From: Muhamed Fazal PS Date: Wed, 15 Jul 2026 18:25:10 +0530 Subject: [PATCH] fix: non-ASCII characters silently ignored in content gap analysis (#122) The content gap detection used [a-zA-Z] which only matches ASCII letters, silently ignoring non-ASCII characters (accented chars, CJK, emoji, etc.). Replaced with [^\W\d_] which matches any Unicode letter in Python 3's Unicode-aware re module. Fixes #122 --- openagent_eval/diagnosis/chunking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openagent_eval/diagnosis/chunking.py b/openagent_eval/diagnosis/chunking.py index dedf887..794fc47 100644 --- a/openagent_eval/diagnosis/chunking.py +++ b/openagent_eval/diagnosis/chunking.py @@ -159,7 +159,7 @@ def _check_content_gaps( "will", "about", "into", "your", "some", "than", } question_words = set( - w.lower() for w in re.findall(r"\b[a-zA-Z]{4,}\b", question) + w.lower() for w in re.findall(r"\b[^\W\d_]{4,}\b", question) ) - stop_words if not question_words: return issues