(self, text_to_summary = True)
Return compression ratio between summary and text.

        Arguments:

            - text_to_summary (bool): compute text/summary ratio (default = True)

        Returns:

            - decimal compression score within [0, ...]
def compression(self, text_to_summary = True):

        """

        Return compression ratio between summary and text.

        Arguments:

            - text_to_summary (bool): compute text/summary ratio (default = True)

        Returns:

            - decimal compression score within [0, ...]

        """

        ratio = [len(self.text), len(self.summary)]

        try:

            if text_to_summary: return ratio[0] / ratio[1]
            else:               return ratio[1] / ratio[0]

        except ZeroDivisionError:

            return 0
def compression ( self , text_to_summary = True ) : ratio = [ len ( self . text ) , len ( self . summary ) ] try : if text_to_summary : return ratio [ 0 ] / ratio [ 1 ] else : return ratio [ 1 ] / ratio [ 0 ] except ZeroDivisionError : return 0