code: def babelfy(self, text, params=None):
          
          self._entities = list()
          self._all_entities = list()
          self._merged_entities = list()
          self._all_merged_entities = list()
          self._text = " ".join(word.strip() for word in text.split())
  
          params = params or self._params
          params['key'] = self._api_key
          params['text'] = self._text
          if (sys.version < '3' and isinstance(params['text'], unicode)) or (sys.version >= '3' and isinstance(params['text'], bytes)): #pylint: disable=undefined-variable
              params['text'] = params['text'].encode('utf-8')
          url = BABELFY_API_URL + '?' + urlencode(params)
  
          request = Request(url)
          request.add_header('Accept-encoding', 'gzip')
          response = urlopen(request)
          if sys.version < '3':
              buf = StringIO(response.read())
          else:
              buf = BytesIO(response.read())
          f = gzip.GzipFile(fileobj=buf)
          reader = codecs.getreader('utf-8')
          self._data = json.load(reader(f))
docs: make a request to the babelfy api and babelfy param text
          set self._data with the babelfied text as json object