API output without Persian diacritics or written ezafe ی (company decision); tutor answers too
plain_persian() strips kasra/fatha/damma/shadda/sukun/hamza-above and the written «هی» ezafe, keeping tanwin. Applied at output, not in data: PlainPersianJSONRenderer runs one byte-level pass over every JSON response (~5 ms per MB locally), and to_plain() cleans tutor answers including the stream. Rewriting titles in the DB/seed would have broken question binding by title path and SeedRecord keys. Tests updated to expect the cleaned text; config/tests_plain_persian.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ OFF_TOPIC_MARKER = '[خارج-از-ریاضی]'
|
||||
|
||||
REFUSAL = (
|
||||
'من «پی» هستم و فقط توی ریاضی میتونم کمکت کنم 🙂\n'
|
||||
'یه سوالِ ریاضی بپرس، مثلاً از درسی که الان داری میخونی یا تمرینی که توش گیر کردی.'
|
||||
'یه سوال ریاضی بپرس، مثلاً از درسی که الان داری میخونی یا تمرینی که توش گیر کردی.'
|
||||
)
|
||||
|
||||
# اورژانسِ اجتماعیِ بهزیستی ۱۲۳ و صدای مشاورِ بهزیستی ۱۴۸۰، هر دو سراسری و رایگان.
|
||||
|
||||
Reference in New Issue
Block a user