Commit ·
1e65c93
1
Parent(s): b4e2427
Fix structured data regex bug in spelling rules
Browse files
src/nlp/spelling/araspell_rules.py
CHANGED
|
@@ -633,7 +633,7 @@ class OutputValidator:
|
|
| 633 |
|
| 634 |
# ── Protect Structured Data ──
|
| 635 |
# Reject spelling modifications to English, JSON, URLs, Emails, Hashtags
|
| 636 |
-
if re.search(r'[a-zA-Z]|\{
|
| 637 |
if original != corrected:
|
| 638 |
return False, "structural_protection"
|
| 639 |
|
|
|
|
| 633 |
|
| 634 |
# ── Protect Structured Data ──
|
| 635 |
# Reject spelling modifications to English, JSON, URLs, Emails, Hashtags
|
| 636 |
+
if re.search(r'[a-zA-Z]|\{|\[|<|#|@|://', original):
|
| 637 |
if original != corrected:
|
| 638 |
return False, "structural_protection"
|
| 639 |
|