Skip to content

Commit

Permalink
Revert "text: temp drop Chrf implementation (#2668)"
Browse files Browse the repository at this point in the history
This reverts commit 663f06d.
  • Loading branch information
Borda committed Aug 20, 2024
1 parent 06201a2 commit 53abf9a
Show file tree
Hide file tree
Showing 5 changed files with 886 additions and 82 deletions.
9 changes: 8 additions & 1 deletion src/torchmetrics/functional/text/_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,14 @@ def _chrf_score(
whitespace: bool = False,
return_sentence_level_score: bool = False,
) -> Union[Tensor, Tuple[Tensor, Tensor]]:
"""Wrapper for deprecated import."""
"""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']]
>>> _chrf_score(preds, target)
tensor(0.8640)
"""
_deprecated_root_import_func("chrf_score", "text")
return chrf_score(
preds=preds,
Expand Down
Loading

0 comments on commit 53abf9a

Please sign in to comment.