class_docstr: Implements the *TextRank* algorithm defined by
  [[mihalcea04textrank]](https://derwen.ai/docs/ptr/biblio/#mihalcea04textrank),
  deployed as a `spaCy` pipeline component.
  
  This class does not get called directly; instantiate its factory
  instead.
      
class_docstr_tok: ["Implements","the","*","TextRank","*","algorithm","defined","by","[","[","mihalcea04textrank","]","]","(","https",":","\/\/derwen.ai\/docs\/ptr\/biblio\/","#","mihalcea04textrank",")",",","deployed","as","a","`","spaCy","`","pipeline","component",".","This","class","does","not","get","called","directly",";","instantiate","its","factory","instead","."]
docstr: Serialize the lemma graph in the `Dot` file format.
  
      path:
  path for the output file; defaults to `"graph.dot"`
          
code: def write_dot(
      self,
      *,
      path: typing.Optional[
          typing.Union[str, pathlib.Path]
      ] = "graph.dot",
  ) -> None:
      """
      Serialize the lemma graph in the `Dot` file format.
  
          path:
      path for the output file; defaults to `"graph.dot"`
      """
      dot = graphviz.Digraph()
  
      for lemma in self.lemma_graph.nodes():
          rank = self.ranks[lemma]
          key = lemma.label()
  
          label = "{} ({:.4f})".format(key, rank)
          dot.node(key, label)
  
      for edge in self.lemma_graph.edges():
          dot.edge(edge[0].label(), edge[1].label(), constraint="false")
  
      if isinstance(path, str):
          path = pathlib.Path(path)
  
      with open(path, "w") as f:  # type: ignore
          f.write(dot.source)
  
imports: from collections import Counter, defaultdict, OrderedDict
  from dataclasses import dataclass
  import json
  import math
  import pathlib
  import time
  import typing
  from icecream import ic
  from spacy.tokens import Doc, Span, Token
  import graphviz
  import networkx
  from .util import groupby_apply, default_scrubber
label_desc: Use image node_id 17 for calling the BaseTextRank obj's underlying member method code with example usage: obj.write_dot() without return types