class_docstr: Implements a document builder
  
  Args:
  ----
      resolve_lines: whether words should be automatically grouped into lines
      resolve_blocks: whether lines should be automatically grouped into blocks
      paragraph_break: relative length of the minimum space separating paragraphs
      export_as_straight_boxes: if True, force straight boxes in the export (fit a rectangle
          box to all rotated boxes). Else, keep the boxes format unchanged, no matter what it is.
class_docstr_tok: ["Implements","a","document","builder","Args",":","--","--","resolve_lines",":","whether","words","should","be","automatically","grouped","into","lines","resolve_blocks",":","whether","lines","should","be","automatically","grouped","into","blocks","paragraph_break",":","relative","length","of","the","minimum","space","separating","paragraphs","export_as_straight_boxes",":","if","True",",","force","straight","boxes","in","the","export","(","fit","a","rectangle","box","to","all","rotated","boxes",")",".","Else",",","keep","the","boxes","format","unchanged",",","no","matter","what","it","is","."]
code: def __init__(
      self,
      resolve_lines: bool = True,
      resolve_blocks: bool = True,
      paragraph_break: float = 0.035,
      export_as_straight_boxes: bool = False,
  ) -> None:
      self.resolve_lines = resolve_lines
      self.resolve_blocks = resolve_blocks
      self.paragraph_break = paragraph_break
      self.export_as_straight_boxes = export_as_straight_boxes
  
file_path: doctr/doctr/models/builder.py
imports: from typing import Any, Dict, List, Optional, Tuple
  import numpy
  from scipy.cluster.hierarchy import fclusterdata
  from doctr.io.elements import Block, Document, KIEDocument, KIEPage, Line, Page, Prediction, Word
  from doctr.utils.geometry import estimate_page_angle, resolve_enclosing_bbox, resolve_enclosing_rbbox, rotate_boxes
  from doctr.utils.repr import NestedObject
label_desc: Use image node_id 1 to create a new DocumentBuilder object from inherited base classes: NestedObject with example: obj = DocumentBuilder(resolve_lines, resolve_blocks, paragraph_break, export_as_straight_boxes)