docstr: Parameters
  ----------
  term_ranker : TermRanker
      Default AbsoluteFrequencyRanker
  minimum_term_count : int
      Default 2
  number_terms_per_length : int
      Select X top PMI terms per ngram length
      Default 2000
  show_progress : bool
      Shows TQDM for PMI filtering
docstr_tok: ["Parameters","--","--","--","--","--","term_ranker",":","TermRanker","Default","AbsoluteFrequencyRanker","minimum_term_count",":","int","Default","2","number_terms_per_length",":","int","Select","X","top","PMI","terms","per","ngram","length","Default","2000","show_progress",":","bool","Shows","TQDM","for","PMI","filtering"]
code: def __init__(
      self,
      term_ranker: type = AbsoluteFrequencyRanker,
      minimum_term_count: int = 2,
      number_terms_per_length: int = 2000,
      show_progress: bool = True,
  ):
      """
  
      Parameters
      ----------
      term_ranker : TermRanker
          Default AbsoluteFrequencyRanker
      minimum_term_count : int
          Default 2
      number_terms_per_length : int
          Select X top PMI terms per ngram length
          Default 2000
      show_progress : bool
          Shows TQDM for PMI filtering
  
      """
      self.term_ranker = term_ranker
      self.minimum_term_count = minimum_term_count
      self.number_terms_per_length = number_terms_per_length
      self.show_progress = show_progress
  
file_path: scattertext/scattertext/termcompaction/npmi_compactor.py
imports: import numpy
  import pandas
  from tqdm.auto import tqdm
  from scattertext.termranking.TermRanker import TermRanker
  from scattertext.termranking.AbsoluteFrequencyRanker import AbsoluteFrequencyRanker
label_desc: Use image node_id 1 to create a new NPMICompactor object from inherited base classes: object with example: obj = NPMICompactor(term_ranker, minimum_term_count, number_terms_per_length, show_progress)