Skip to content

error_explainer: normalize errors, add codes + symbol metadata#14

Open
mustafa0x wants to merge 2 commits intoobadx:mainfrom
mustafa0x:fix/explain-error-fallback-details
Open

error_explainer: normalize errors, add codes + symbol metadata#14
mustafa0x wants to merge 2 commits intoobadx:mainfrom
mustafa0x:fix/explain-error-fallback-details

Conversation

@mustafa0x
Copy link
Copy Markdown

Summary

  • normalize fallback speech_error_type in explain_error using expected vs predicted phoneme spans
  • fill missing expected_len and predicted_len from phoneme string lengths
  • keep existing tajweed-rule metadata behavior unchanged

Why

Fallback errors could be emitted with vague or mismatched speech_error_type and without length detail, which makes downstream feedback unclear.

Validation

  • python -m py_compile src/quran_transcript/phonetics/error_explainer.py passes
  • change is isolated to error_explainer.py

Scope

  • source-of-truth core logic only (quran-transcript)
  • no API contract changes in this PR

@mustafa0x mustafa0x changed the title error_explainer: normalize fallback speech type and lengths error_explainer: normalize errors, add codes + symbol metadata Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant