Translation Edit Rate (TER)¶
Module Interface¶
- torchmetrics.TranslationEditRate[source]
alias of
torchmetrics.text._deprecated._TranslationEditRate
Functional Interface¶
- torchmetrics.functional.translation_edit_rate(preds, target, normalize=False, no_punctuation=False, lowercase=True, asian_support=False, return_sentence_level_score=False)[source]
Wrapper for deprecated import.
>>> preds = ['the cat is on the mat'] >>> target = [['there is a cat on the mat', 'a cat is on the mat']] >>> _translation_edit_rate(preds, target) tensor(0.1538)