tokenizer.py
def delete_pair(self,pair):
        """Delete the pair from the stats table and update the required variables
        Args:
            pair (tuple): Pair to be deleted
        """
        assert (pair in self.stats and pair in self.cost_stats)
        prev_cost = self.cost_stats[pair]
        self.stats.pop(pair)
        self.cost_stats.pop(pair)
        assert (prev_cost in self.inv_cost_stats)
        assert (pair not in self.inv_cost_stats[prev_cost]) #Since the pair has already been popped from the set while getting the maximum pair
        if not self.inv_cost_stats[prev_cost]:
            self.cost_heap.delete(prev_cost)
            self.inv_cost_stats.pop(prev_cost)
Delete the pair from the stats table and update the required variables
        Args:
            pair (tuple): Pair to be deleted
        
Delete the pair from the stats table and update the required variables
Delete the pair from the stats table and update the required variables
def delete_pair(self,pair):
        assert (pair in self.stats and pair in self.cost_stats)
        prev_cost = self.cost_stats[pair]
        self.stats.pop(pair)
        self.cost_stats.pop(pair)
        assert (prev_cost in self.inv_cost_stats)
        assert (pair not in self.inv_cost_stats[prev_cost]) 
        if not self.inv_cost_stats[prev_cost]:
            self.cost_heap.delete(prev_cost)
            self.inv_cost_stats.pop(prev_cost)
def delete_pair ( self , pair ) : assert ( pair in self . stats and pair in self . cost_stats ) prev_cost = self . cost_stats [ pair ] self . stats . pop ( pair ) self . cost_stats . pop ( pair ) assert ( prev_cost in self . inv_cost_stats ) assert ( pair not in self . inv_cost_stats [ prev_cost ] ) if not self . inv_cost_stats [ prev_cost ] : self . cost_heap . delete ( prev_cost ) self . inv_cost_stats . pop ( prev_cost )
Delete the pair from the stats table and update the required variables
Delete the pair from the stats table and update the required variables
"""Delete the pair from the stats table and update the required variables
        Args:
            pair (tuple): Pair to be deleted
        """ #Since the pair has already been popped from the set while getting the maximum pair
self
pair
Pair to be deleted
Pair to be deleted