Extended Edit Distance¶
Module Interface¶
- torchmetrics.ExtendedEditDistance[source]
alias of
_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"] :rtype: :py:data:`~typing.Union`\[:py:class:`~torch.Tensor`, :py:data:`~typing.Tuple`\[:py:class:`~torch.Tensor`, :py:class:`~torch.Tensor`]]
>>> _extended_edit_distance(preds=preds, target=target) tensor(0.3078)