def __init__(self,filename, encoding=False):
        """Open a target-source GIZA++ A3 file. The file may be bzip2 compressed. If an encoding is specified, proper unicode strings will be returned"""

        if filename.split(".")[-1] == "bz2":
            self.stream = bz2.BZ2File(filename,'r')
        else:
            self.stream = open(filename)
        self.encoding = encoding
def __init__ ( self , filename , encoding = False ) : if filename . split ( "." ) [ - 1 ] == "bz2" : self . stream = bz2 . BZ2File ( filename , 'r' ) else : self . stream = open ( filename ) self . encoding = encoding
Open a target-source GIZA++ A3 file. The file may be bzip2 compressed. If an encoding is specified, proper unicode strings will be returned