File size: 492 Bytes
8360ec7
 
 
eca534f
8360ec7
eca534f
 
 
8360ec7
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from openfactcheck.core.state import FactCheckerState
from openfactcheck.core.solver import StandardTaskSolver, Solver

@Solver.register("all_pass_abstain_detector", "response", "response")
class AllPassAbstainDetector(StandardTaskSolver):
    """
    A solver to detect if all the claims are abstained (i.e., no claim is made).
    """
    def __init__(self, args):
        super().__init__(args)

    def __call__(self, state: FactCheckerState, *args, **kwargs):
        return True, state