Extended Edit Distance¶
Module Interface¶
- torchmetrics.ExtendedEditDistance[source]
alias of
torchmetrics.text._deprecated._ExtendedEditDistance
Functional Interface¶
- torchmetrics.functional.extended_edit_distance(preds, target, language='en', return_sentence_level_score=False, alpha=2.0, rho=0.3, deletion=0.2, insertion=1.0)[source]
Wrapper for deprecated import.
>>> preds = ["this is the prediction", "here is an other sample"] >>> target = ["this is the reference", "here is another one"] >>> _extended_edit_distance(preds=preds, target=target) tensor(0.3078)