examples/text_to_sql/RAT-SQL/evaluation/text2sql_evaluation.py
def eval_exact_match(self, pred, gold, value_match=True):
        """wrapper of evaluate examct match, to process
        `SQL1 intersect/union SQL2` vs `SQL2 intersect/union SQL1`

        Args:
            pred (TYPE): NULL
            gold (TYPE): NULL

        Returns: TODO

        Raises: NULL
        """
        score = self._eval_exact_match(pred, gold, value_match=value_match)
        if score == 1:
            return score

        if gold['union'] is not None:
            gold_tmp = copy.deepcopy(gold)
            new_gold = gold_tmp['union']
            gold_tmp['union'] = None
            new_gold['union'] = gold_tmp
            return self._eval_exact_match(
                pred, new_gold, value_match=value_match)
        elif gold['intersect'] is not None:
            gold_tmp = copy.deepcopy(gold)
            new_gold = gold_tmp['intersect']
            gold_tmp['intersect'] = None
            new_gold['intersect'] = gold_tmp
            return self._eval_exact_match(
                pred, new_gold, value_match=value_match)
        else:
            return 0
wrapper of evaluate examct match, to process
        `SQL1 intersect/union SQL2` vs `SQL2 intersect/union SQL1`

        Args:
            pred (TYPE): NULL
            gold (TYPE): NULL

        Returns: TODO

        Raises: NULL
        
wrapper of evaluate examct match, to process
`SQL1 intersect/union SQL2` vs `SQL2 intersect/union SQL1`
wrapper of evaluate examct match to process ` SQL1 intersect / union SQL2 ` vs ` SQL2 intersect / union SQL1 `
def eval_exact_match(self, pred, gold, value_match=True):
        score = self._eval_exact_match(pred, gold, value_match=value_match)
        if score == 1:
            return score
        if gold['union'] is not None:
            gold_tmp = copy.deepcopy(gold)
            new_gold = gold_tmp['union']
            gold_tmp['union'] = None
            new_gold['union'] = gold_tmp
            return self._eval_exact_match(
                pred, new_gold, value_match=value_match)
        elif gold['intersect'] is not None:
            gold_tmp = copy.deepcopy(gold)
            new_gold = gold_tmp['intersect']
            gold_tmp['intersect'] = None
            new_gold['intersect'] = gold_tmp
            return self._eval_exact_match(
                pred, new_gold, value_match=value_match)
        else:
            return 0
def eval_exact_match ( self , pred , gold , value_match = True ) : score = self . _eval_exact_match ( pred , gold , value_match = value_match ) if score == 1 : return score if gold [ 'union' ] is not None : gold_tmp = copy . deepcopy ( gold ) new_gold = gold_tmp [ 'union' ] gold_tmp [ 'union' ] = None new_gold [ 'union' ] = gold_tmp return self . _eval_exact_match ( pred , new_gold , value_match = value_match ) elif gold [ 'intersect' ] is not None : gold_tmp = copy . deepcopy ( gold ) new_gold = gold_tmp [ 'intersect' ] gold_tmp [ 'intersect' ] = None new_gold [ 'intersect' ] = gold_tmp return self . _eval_exact_match ( pred , new_gold , value_match = value_match ) else : return 0
wrapper of evaluate examct match, to process
`SQL1 intersect/union SQL2` vs `SQL2 intersect/union SQL1`
wrapper of evaluate examct match to process ` SQL1 intersect / union SQL2 ` vs ` SQL2 intersect / union SQL1 `
"""wrapper of evaluate examct match, to process
        `SQL1 intersect/union SQL2` vs `SQL2 intersect/union SQL1`

        Args:
            pred (TYPE): NULL
            gold (TYPE): NULL

        Returns: TODO

        Raises: NULL
        """
self
pred
None
gold
None
value_match