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: Constructor for a factory used to instantiate the PyTextRank pipeline components.
  
      edge_weight:
  default weight for an edge
  
      pos_kept:
  parts of speech tags to be kept; adjust this if strings representing the POS tags change
  
      token_lookback:
  the window for neighboring tokens – similar to a *skip gram*
  
      scrubber:
  optional "scrubber" function to clean up punctuation from a token; if `None` then defaults to `pytextrank.default_scrubber`; when running, PyTextRank will throw a `FutureWarning` warning if the configuration uses a deprecated approach for a scrubber function
  
      stopwords:
  optional dictionary of `lemma: [pos]` items to define the *stop words*, where each item has a key as a lemmatized token and a value as a list of POS tags; may be a file name (string) or a [`pathlib.Path`](https://docs.python.org/3/library/pathlib.html) for a JSON file; otherwise throws a `TypeError` exception
          
code: def __init__(
      self,
      *,
      edge_weight: float = _EDGE_WEIGHT,
      pos_kept: typing.List[str] = None,
      token_lookback: int = _TOKEN_LOOKBACK,
      scrubber: typing.Optional[typing.Callable] = None,
      stopwords: typing.Optional[StopWordsLike] = None,
  ) -> None:
      """
      Constructor for a factory used to instantiate the PyTextRank pipeline components.
  
          edge_weight:
      default weight for an edge
  
          pos_kept:
      parts of speech tags to be kept; adjust this if strings representing the POS tags change
  
          token_lookback:
      the window for neighboring tokens – similar to a *skip gram*
  
          scrubber:
      optional "scrubber" function to clean up punctuation from a token; if `None` then defaults to `pytextrank.default_scrubber`; when running, PyTextRank will throw a `FutureWarning` warning if the configuration uses a deprecated approach for a scrubber function
  
          stopwords:
      optional dictionary of `lemma: [pos]` items to define the *stop words*, where each item has a key as a lemmatized token and a value as a list of POS tags; may be a file name (string) or a [`pathlib.Path`](https://docs.python.org/3/library/pathlib.html) for a JSON file; otherwise throws a `TypeError` exception
      """
      self.edge_weight: float = edge_weight
      self.token_lookback: int = token_lookback
  
      if pos_kept:
          self.pos_kept: typing.List[str] = pos_kept
      else:
          self.pos_kept = self._POS_KEPT
  
      if scrubber:
          self.scrubber: typing.Callable = scrubber
      else:
          self.scrubber = default_scrubber
  
      if stopwords:
          self.stopwords: typing.Dict[
              str, typing.List[str]
          ] = self._load_stopwords(stopwords)
      else:
          self.stopwords = defaultdict(list)
  
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 1 to create a new BaseTextRankFactory object  with example: obj = BaseTextRankFactory()