ignite
ignite copied to clipboard
feat(metrics): add Character Error Rate (CER) metric
Description
This PR adds a new NLP metric, CharacterErrorRate, to Ignite.
Character Error Rate (CER) measures the normalized edit distance between predicted and reference strings at the character level.
What’s included
- Adds
CharacterErrorRatemetric implementation - Uses Levenshtein edit distance to compute character-level errors
- Supports batch-wise updates and distributed usage
- Follows Ignite metric API conventions used by existing NLP metrics
Why
CER is a standard evaluation metric for ASR/OCR and other sequence-to-text tasks where character-level accuracy is important.
Fixes #{issue_number}
Checklist
- [x] New tests are added (if a new feature is added)
- [x] New docstrings are added and in RST format
- [x] Documentation is updated (if required)
@Manimaran-tech, could you link the issue number for this PR , also the Empty reference strings aren't handled in update and Distributed integration tests are missing as the other metric bleu and rogue have this
@vfdev-5 should i update the pr or this one is good to be merged?