(self, other)
return self
add an instance (e.g., from another sentence).
add an instance (e.g., from another sentence).
add an instance ( e . g . from another sentence ) .
def __iadd__(self, other):
        '''add an instance (e.g., from another sentence).'''

        if type(other) is tuple:
            ## avoid creating new BleuScorer instances
            self.cook_append(other[0], other[1])
        else:
            assert self.compatible(other), "incompatible BLEUs."
            self.ctest.extend(other.ctest)
            self.crefs.extend(other.crefs)
            self._score = None ## need to recompute

        return self
def __iadd__ ( self , other ) : if type ( other ) is tuple : ## avoid creating new BleuScorer instances self . cook_append ( other [ 0 ] , other [ 1 ] ) else : assert self . compatible ( other ) , "incompatible BLEUs." self . ctest . extend ( other . ctest ) self . crefs . extend ( other . crefs ) self . _score = None ## need to recompute return self