Scores
bocoel.Score
Bases: Protocol
__call__ abstractmethod
__call__(target: Any, references: list[Any]) -> float
Calculate the score of a target given references.
Parameters
target: Any
The target to calculate the score for.
references: list[Any]
The references to calculate the score from.
Returns
The score of the target given the references.
Source code in bocoel/models/scores/interfaces.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
bocoel.NltkBleuScore
Bases: Score
bocoel.SacreBleuScore
SacreBleuScore()
Bases: Score
Source code in bocoel/models/scores/bleu.py
22 23 24 25 26 27 28 29 30 31 32 |
|
bocoel.models.scores.rouge._RougeScoreType module-attribute
_RougeScoreType = Literal['rouge-1', 'rouge-2', 'rouge-l']
bocoel.RougeScore
RougeScore(metric: _RougeScoreType)
Bases: Score
Source code in bocoel/models/scores/rouge.py
11 12 13 14 15 16 |
|
bocoel.models.scores.rouge._RougeScore2Type module-attribute
_RougeScore2Type = Literal['rouge1', 'rouge2', 'rougeL']
bocoel.RougeScore2
RougeScore2(typ: _RougeScore2Type)
Bases: Score
Source code in bocoel/models/scores/rouge.py
39 40 41 42 43 |
|
bocoel.OneHotChoiceAccuracy
Bases: Score
bocoel.MultiChoiceAccuracy
Bases: Score