class_docstr: Create a doc instance of text, obtain cleaned, readable text and
  metadata from this doc.
  
  Properties:
  raw: incoming, unedited text
  language: 2-letter code for the language of the text
  is_detected_language: is the language detected or specified beforehand
  is_reliable_language: is the language specified or was it reliably detected
  hint_language: language you expect your text to be
  _spacy_nlps: nested dictionary {lang: {model_id: model}} with loaded spacy language modules
docstr: Detected the language of a text if no language was provided along with the text
  
  Args:
  hint_language: language you expect your text to be
  
  Returns:
  is_reliable: is the top language is much better than 2nd best language?
  language: 2-letter code for the language of the text
  
  >>> from textpipe.doc import Doc
  >>> doc = Doc('Test')
  >>> doc.detect_language()
  (True, 'en')
  >>> doc.detect_language('nl')
  (True, 'nl')
  >>> Doc('...').detect_language()
  (False, 'un')
docstr_tok: ["Detected","the","language","of","a","text","if","no","language","was","provided","along","with","the","text","Args",":","hint_language",":","language","you","expect","your","text","to","be","Returns",":","is_reliable",":","is","the","top","language","is","much","better","than","2nd","best","language","?","language",":","2-letter","code","for","the","language","of","the","text",">",">",">","from","textpipe.doc","import","Doc",">",">",">","doc","=","Doc","(","'Test","'",")",">",">",">","doc.detect_language","(",")","(","True",",","'en","'",")",">",">",">","doc.detect_language","(","'nl","'",")","(","True",",","'nl","'",")",">",">",">","Doc","(","'","...","'",")",".detect_language","(",")","(","False",",","'un","'",")"]
code: def detect_language(self, hint_language=None):
      """
      Detected the language of a text if no language was provided along with the text
  
      Args:
      hint_language: language you expect your text to be
  
      Returns:
      is_reliable: is the top language is much better than 2nd best language?
      language: 2-letter code for the language of the text
  
      >>> from textpipe.doc import Doc
      >>> doc = Doc('Test')
      >>> doc.detect_language()
      (True, 'en')
      >>> doc.detect_language('nl')
      (True, 'nl')
      >>> Doc('...').detect_language()
      (False, 'un')
      """
  
      none_utf_chars_removed = "".join(
          [
              l
              for l in self.clean
              if unicodedata.category(l)[0] not in {"M", "C"}
          ]
      )
      is_reliable, _, best_guesses = cld2.detect(
          none_utf_chars_removed,
          hintLanguage=hint_language,
          bestEffort=True,
      )
  
      if (
          not best_guesses
          or len(best_guesses[0]) != 4
          or best_guesses[0][1] == "un"
      ):
          return False, "un"
  
      return is_reliable, best_guesses[0][1]
  
imports: import functools
  import re
  import unicodedata
  from collections import Counter
  from urllib.parse import urlparse
  import cld2
  import numpy
  import spacy
  import spacy.matcher
  import textacy
  import textacy.ke
  import textacy.text_utils
  from bs4 import BeautifulSoup
  from datasketch import MinHash
  from gensim.models.keyedvectors import KeyedVectors
  from gensim.summarization.summarizer import summarize
  from textpipe.data.emoji import EMOJI_TO_UNICODE_NAME, EMOJI_TO_SENTIMENT
  from textpipe.wrappers import RedisKeyedVectors
  from textpipe.util import getattr_
label_desc: Use image node_id 4 for calling the Doc obj's underlying member method code with example usage: obj.detect_language(hint_language) and returns: is_reliable,  best_guesses, False,  str