Skip to content
Edit this page

Score API

Score

Bases: Protocol

__call__ abstractmethod

__call__(target: Any, references: list[Any]) -> float

Evaluate the target with respect to the references.

Parameters:

Name Type Description Default
target Any

The target to evaluate.

required
references list[Any]

The references to evaluate against.

required

Returns:

Type Description
float

The score for the target.

Source code in src/bocoel/scores/interfaces.py
@abc.abstractmethod
def __call__(self, target: typing.Any, references: list[typing.Any]) -> float:
    """
    Evaluate the target with respect to the references.

    Parameters:
        target: The target to evaluate.
        references: The references to evaluate against.

    Returns:
        The score for the target.
    """

    ...