class_docstr: Render dependency parses as SVGs.
class_docstr_tok: ["Render","dependency","parses","as","SVGs","."]
docstr: Initialise dependency renderer.
  
  options (dict): Visualiser-specific options (compact, word_spacing,
      arrow_spacing, arrow_width, arrow_stroke, distance, offset_x,
      color, bg, font)
docstr_tok: ["Initialise","dependency","renderer",".","options","(","dict",")",":","Visualiser-specific","options","(","compact",",","word_spacing",",","arrow_spacing",",","arrow_width",",","arrow_stroke",",","distance",",","offset_x",",","color",",","bg",",","font",")"]
code: def __init__(self, options: Dict[str, Any] = {}) -> None:
      """Initialise dependency renderer.
  
      options (dict): Visualiser-specific options (compact, word_spacing,
          arrow_spacing, arrow_width, arrow_stroke, distance, offset_x,
          color, bg, font)
      """
      self.compact = options.get("compact", False)
      self.word_spacing = options.get("word_spacing", 45)
      self.arrow_spacing = options.get(
          "arrow_spacing", 12 if self.compact else 20
      )
      self.arrow_width = options.get(
          "arrow_width", 6 if self.compact else 10
      )
      self.arrow_stroke = options.get("arrow_stroke", 2)
      self.distance = options.get(
          "distance", 150 if self.compact else 175
      )
      self.offset_x = options.get("offset_x", 50)
      self.color = options.get("color", "#000000")
      self.bg = options.get("bg", "#ffffff")
      self.font = options.get("font", "Arial")
      self.direction = DEFAULT_DIR
      self.lang = DEFAULT_LANG
  
imports: import uuid
  from typing import Any, Dict, List, Optional, Tuple, Union
  from ..errors import Errors
  from ..util import escape_html, minify_html, registry
  from .templates import TPL_DEP_ARCS, TPL_DEP_SVG, TPL_DEP_WORDS, TPL_DEP_WORDS_LEMMA, TPL_ENT, TPL_ENT_RTL, TPL_ENTS, TPL_FIGURE, TPL_KB_LINK, TPL_PAGE, TPL_SPAN, TPL_SPAN_RTL, TPL_SPAN_SLICE, TPL_SPAN_SLICE_RTL, TPL_SPAN_START, TPL_SPAN_START_RTL, TPL_SPANS, TPL_TITLE
label_desc: Use image node_id 1 to create a new DependencyRenderer object  with example: obj = DependencyRenderer(options)