nerd/nerd_client.py
def get_language(self, text):
        """ Recognise the language of the text in input

        Args:
              id (str): The text whose the language needs to be recognised

        Returns:
            dict, int: A dict containing the recognised language and the
                confidence score.
        """
        files = {'text': text}
        res, status_code = self.post(self.language_service, files=files)

        if status_code != 200:
            logger.debug('Language recognition failed.')

        return self.decode(res), status_code
def get_language(self, text):
        """ Recognise the language of the text in input

        Args:
              id (str): The text whose the language needs to be recognised

        Returns:
            dict, int: A dict containing the recognised language and the
                confidence score.
        """
        files = {'text': text}
        res, status_code = self.post(self.language_service, files=files)

        if status_code != 200:
            logger.debug('Language recognition failed.')

        return self.decode(res), status_code
Recognise the language of the text in input

        Args:
              id (str): The text whose the language needs to be recognised

        Returns:
            dict, int: A dict containing the recognised language and the
                confidence score.