class_docstr: Parser of text from HTML format into DOM.
class_docstr_tok: ["Parser","of","text","from","HTML","format","into","DOM","."]
code: def document(self):
      # "a", "abbr", "acronym", "b", "big", "blink", "blockquote", "cite", "code",
      # "dd", "del", "dfn", "dir", "dl", "dt", "em", "h", "h1", "h2", "h3", "h4",
      # "h5", "h6", "i", "ins", "kbd", "li", "marquee", "menu", "ol", "pre", "q",
      # "s", "samp", "strike", "strong", "sub", "sup", "tt", "u", "ul", "var",
  
      annotated_text = self._article.main_text
  
      paragraphs = []
      for paragraph in annotated_text:
          sentences = []
  
          current_text = ""
          for text, annotations in paragraph:
              if annotations and (
                  "h1" in annotations
                  or "h2" in annotations
                  or "h3" in annotations
              ):
                  sentences.append(
                      Sentence(text, self._tokenizer, is_heading=True)
                  )
              # skip <pre> nodes
              elif not (annotations and "pre" in annotations):
                  # be sure to not add empty space between word and punctuations
                  current_text += (
                      "" + text
                      if text[0] in punctuation
                      else " " + text
                  )
  
          new_sentences = self.tokenize_sentences(current_text)
          sentences.extend(
              Sentence(s, self._tokenizer) for s in new_sentences
          )
          paragraphs.append(Paragraph(sentences))
  
      return ObjectDocumentModel(paragraphs)
  
file_path: sumy/sumy/parsers/html.py
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  from breadability.readable import Article
  from ..utils import cached_property, fetch_url
  from ..models.dom import Sentence, Paragraph, ObjectDocumentModel
  from .parser import DocumentParser
  from string import punctuation
label_desc: Use image node_id 8 for calling the HtmlParser obj's underlying member method code with example usage: obj.document() and returns: ObjectDocumentModel