class_docstr: A factory class that provides the document with its instance of
  `TopicRank`
      
docstr: Constructor for the factory class.
          
docstr_tok: ["Constructor","for","the","factory","class","."]
code: def __init__(
      self,
      *,
      edge_weight: float = BaseTextRankFactory._EDGE_WEIGHT,
      pos_kept: typing.List[str] = None,
      token_lookback: int = BaseTextRankFactory._TOKEN_LOOKBACK,
      scrubber: typing.Optional[typing.Callable] = None,
      stopwords: typing.Optional[StopWordsLike] = None,
      threshold: float = _CLUSTER_THRESHOLD,
      method: str = _CLUSTER_METHOD,
  ) -> None:
      """
      Constructor for the factory class.
      """
      super().__init__(
          edge_weight=edge_weight,
          pos_kept=pos_kept,
          token_lookback=token_lookback,
          scrubber=scrubber,
          stopwords=stopwords,
      )
  
      # TopicRank clustering parameters
      self.threshold: float = threshold
      self.method: str = method
  
imports: from collections import defaultdict
  from functools import lru_cache
  import time
  import typing
  from icecream import ic
  from scipy.cluster.hierarchy import fcluster, linkage
  from scipy.spatial.distance import pdist
  from spacy.tokens import Doc, Span
  import networkx
  from .base import BaseTextRank, BaseTextRankFactory, Phrase, StopWordsLike
label_desc: Use image node_id 1 to create a new TopicRankFactory object from inherited base classes: BaseTextRankFactory with example: obj = TopicRankFactory()