examples/text_to_sql/RAT-SQL/text2sql/utils/dusql_evaluation.py
def eval_exact_match(self, pred, gold):
        """wrapper of evaluate examct match, to process
        `SQL1 intersect/union SQL2` vs `SQL2 intersect/union SQL1`
        """
        score = self._eval_exact_match(pred, gold)
        if score == 1:
            return score

        if gold['union'] is not None:
            new_gold = gold['union']
            gold['union'] = None
            new_gold['union'] = gold
            return self._eval_exact_match(pred, new_gold)
        elif gold['intersect'] is not None:
            new_gold = gold['intersect']
            gold['intersect'] = None
            new_gold['intersect'] = gold
            return self._eval_exact_match(pred, new_gold)
        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 `
def eval_exact_match(self, pred, gold):
        score = self._eval_exact_match(pred, gold)
        if score == 1:
            return score
        if gold['union'] is not None:
            new_gold = gold['union']
            gold['union'] = None
            new_gold['union'] = gold
            return self._eval_exact_match(pred, new_gold)
        elif gold['intersect'] is not None:
            new_gold = gold['intersect']
            gold['intersect'] = None
            new_gold['intersect'] = gold
            return self._eval_exact_match(pred, new_gold)
        else:
            return 0
def eval_exact_match ( self , pred , gold ) : score = self . _eval_exact_match ( pred , gold ) if score == 1 : return score if gold [ 'union' ] is not None : new_gold = gold [ 'union' ] gold [ 'union' ] = None new_gold [ 'union' ] = gold return self . _eval_exact_match ( pred , new_gold ) elif gold [ 'intersect' ] is not None : new_gold = gold [ 'intersect' ] gold [ 'intersect' ] = None new_gold [ 'intersect' ] = gold return self . _eval_exact_match ( pred , new_gold ) 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`
        """
self
pred
gold