Scores
Class representing a Scorer object.
Attributes:
Name | Type | Description |
---|---|---|
func |
Callable[[str, str], float]
|
The scoring function to be wrapped. |
Methods:
Name | Description |
---|---|
measure |
str, target: str) -> float: Calculates the score between the completion and target strings using the wrapped scoring function. |
name |
Returns the name of the wrapped scoring function with underscores replaced by spaces and title-cased. |
Source code in parsbench/scores/base.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
Wraps a scorer function inside the Scorer class.
Source code in parsbench/scores/base.py
30 31 32 |
|
Source code in parsbench/scores/common.py
4 5 6 |
|
Source code in parsbench/scores/machine_translation.py
7 8 9 10 11 12 13 14 15 16 |
|
Source code in parsbench/scores/machine_translation.py
19 20 21 22 23 24 25 26 |
|
Source code in parsbench/scores/summarization.py
8 9 10 11 12 13 14 15 16 |
|
Source code in parsbench/scores/summarization.py
19 20 21 22 23 24 25 |
|