(text)
| 2 | |
| 3 | |
| 4 | def normalize_text(text): |
| 5 | text = str(text).lower().strip() |
| 6 | replacements = { |
| 7 | "ı": "i", |
| 8 | "ğ": "g", |
| 9 | "ü": "u", |
| 10 | "ş": "s", |
| 11 | "ö": "o", |
| 12 | "ç": "c", |
| 13 | } |
| 14 | for old, new in replacements.items(): |
| 15 | text = text.replace(old, new) |
| 16 | return re.sub(r"[^a-z0-9 .:/_-]+", " ", text).strip() |
| 17 | |
| 18 | |
| 19 | def clean_assistant_output(text): |
no test coverage detected