class_docstr: A factory class that provides the document with its instance of
  `BaseTextRank`
      
class_docstr_tok: ["A","factory","class","that","provides","the","document","with","its","instance","of","`","BaseTextRank","`"]
docstr: Set the extension attributes on a `spaCy` [`Doc`](https://spacy.io/api/doc)
  document to create a *pipeline component* for `BaseTextRank` as
  a stateful component, invoked when the document gets processed.
  
  See: <https://spacy.io/usage/processing-pipelines#pipelines>
  
      doc:
  a document container, providing the annotations produced by earlier stages of the `spaCy` pipeline
          
code: def __call__(
      self,
      doc: Doc,
  ) -> Doc:
      """
      Set the extension attributes on a `spaCy` [`Doc`](https://spacy.io/api/doc)
      document to create a *pipeline component* for `BaseTextRank` as
      a stateful component, invoked when the document gets processed.
  
      See: <https://spacy.io/usage/processing-pipelines#pipelines>
  
          doc:
      a document container, providing the annotations produced by earlier stages of the `spaCy` pipeline
      """
      Doc.set_extension("textrank", force=True, default=None)
      Doc.set_extension("phrases", force=True, default=[])
  
      doc._.textrank = BaseTextRank(
          doc,
          edge_weight=self.edge_weight,
          pos_kept=self.pos_kept,
          token_lookback=self.token_lookback,
          scrubber=self.scrubber,
          stopwords=self.stopwords,
      )
  
      doc._.phrases = doc._.textrank.calc_textrank()
      return doc
  
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 3 for calling the BaseTextRankFactory obj's underlying member method code with example usage: obj.__call__(doc) and returns: doc