Skip to content

Commit

Permalink
Add ROUGE score lens to python API
Browse files Browse the repository at this point in the history
  • Loading branch information
druzsan committed Nov 20, 2023
1 parent 9e73a80 commit 25bc544
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions renumics/spotlight/layout/lenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,12 @@ def spectrogram(
name=name,
settings={"freqScale": frequency_scale, "ampScale": amplitude_scale},
)


def rouge_score(column: str, reference_column: str, name: Optional[str] = None) -> Lens:
"""
Add ROUGE score viewer to Spotlight inspector widget.
Supports a pair of string columns.
"""
return Lens(type="RougeScoreView", columns=[column, reference_column], name=name)

0 comments on commit 25bc544

Please sign in to comment.