def parse(self, text):
        '''Returns a list of addresses found in text
        together with parsed address parts
        '''
        results = []
        if isinstance(text, str):
            if six.PY2:
                text = unicode(text, 'utf-8')
        self.clean_text = self._normalize_string(text)

        # get addresses
        addresses = set(self._get_addresses(self.clean_text))
        if addresses:
            # append parsed address info
            results = list(map(self._parse_address, addresses))

        return results
def parse ( self , text ) : results = [ ] if isinstance ( text , str ) : if six . PY2 : text = unicode ( text , 'utf-8' ) self . clean_text = self . _normalize_string ( text ) addresses = set ( self . _get_addresses ( self . clean_text ) ) if addresses : results = list ( map ( self . _parse_address , addresses ) ) return results
Returns a list of addresses found in text
        together with parsed address parts