class_docstr: Detect the language of the input corpus.
  
  We currently support three pretrained models:
  
      - model='langid'
          Use the langid implementation from
           https://github.com/saffsd/langid.py
      - model='fasttext'
          Use the fasttext model "lid.176.bin" from
           https://fasttext.cc/docs/en/language-identification.html
      - model='fasttext_compressed'
          Use the compressed fasttext model "lid.176.ftz"
          from  https://fasttext.cc/docs/en/language-identification.html
  
  .. code-block:: none
  
      References:
  
      @article{joulin2016bag,
        title={Bag of Tricks for Efficient Text Classification},
        author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Mikolov, Tomas},
        journal={arXiv preprint arXiv:1607.01759},
        year={2016}
      }
  
      @article{joulin2016fasttext,
        title={FastText.zip: Compressing text classification models},
        author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Douze, Matthijs and J{\'e}gou, H{\'e}rve and Mikolov, Tomas},
        journal={arXiv preprint arXiv:1612.03651},
        year={2016}
      }
  
      @inproceedings{lui2012langid,
        title={langid. py: An off-the-shelf language identification tool},
        author={Lui, Marco and Baldwin, Timothy},
        booktitle={Proceedings of the ACL 2012 system demonstrations},
        pages={25--30},
        year={2012},
        organization={Association for Computational Linguistics}
      }
docstr: Parameters
  ----------
  corpus
      Input corpus
  
  Returns
  -------
  lang_label
      The ISO-639 1 code of the predicted language
  score
      The score of the prediction
docstr_tok: ["Parameters","--","--","--","--","--","corpus","Input","corpus","Returns","--","--","--","-","lang_label","The","ISO-639","1","code","of","the","predicted","language","score","The","score","of","the","prediction"]
code: def __call__(self, corpus: str):
      """
  
      Parameters
      ----------
      corpus
          Input corpus
  
      Returns
      -------
      lang_label
          The ISO-639 1 code of the predicted language
      score
          The score of the prediction
      """
      if self._use_fasttext:
          labels, scores = self._model.predict(corpus)
          label = labels[0].replace("__label__", "")
          return label, scores[0]
      else:
          return self._model.classify(corpus.lower())
  
imports: import re
  import regex
  import requests
  import unicodedata
  import os
  import warnings
  from typing import List, Pattern, Union, Tuple, Optional
  from sacremoses.normalize import MosesPunctNormalizer
  from ..utils.lazy_imports import try_import_fasttext, try_import_langid
  from ..utils.misc import download
  from ..base import get_model_zoo_home_dir, get_repo_url
label_desc: Use image node_id 3 for calling the LanguageIdentifier obj's underlying member method code with example usage: obj.__call__(corpus) and returns: label,  scores, self