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: Clean HTML and normalise punctuation.
  
  >>> from textpipe.doc import Doc
  >>> doc = Doc('“Please clean this piece… of text</b>„')
  >>> doc.clean_text(False, False, False, False) == doc.raw
  True
docstr_tok: ["Clean","HTML","and","normalise","punctuation",".",">",">",">","from","textpipe.doc","import","Doc",">",">",">","doc","=","Doc","(","'","\u201c","Please","clean","this","piece\u2026","of","text","<","\/b",">","\u201e","'",")",">",">",">","doc.clean_text","(","False",",","False",",","False",",","False",")","==","doc.raw","True"]
code: def clean_text(
      self,
      remove_html=True,
      clean_dots=True,
      clean_quotes=True,
      clean_whitespace=True,
  ):
      """
      Clean HTML and normalise punctuation.
  
      >>> from textpipe.doc import Doc
      >>> doc = Doc('“Please clean this piece… of text</b>„')
      >>> doc.clean_text(False, False, False, False) == doc.raw
      True
      """
      text = self.raw
      if remove_html:
          text = BeautifulSoup(
              text, "html.parser"
          ).get_text()  # remove HTML
  
      # Three regexes below adapted from Blendle cleaner.py
      # https://github.com/blendle/research-summarization/blob/master/enrichers/cleaner.py#L29
      if clean_dots:
          text = re.sub(r"…", "...", text)
      if clean_quotes:
          text = re.sub(r"[`‘’‛⸂⸃⸌⸍⸜⸝]", "'", text)
          text = re.sub(r"[„“]|(\'\')|(,,)", '"', text)
      if clean_whitespace:
          text = re.sub(r"\s+", " ", text).strip()
  
      return text
  
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 9 for calling the Doc obj's underlying member method code with example usage: obj.clean_text(remove_html, clean_dots, clean_quotes, clean_whitespace) and returns: text