docstr: Parameters
  ----------
  term_doc_matrix : TermDocMatrix
      Term document matrix object to compact
  non_text : bool
      Use non-text features instead of terms
  
  Returns
  -------
  New term doc matrix
docstr_tok: ["Parameters","--","--","--","--","--","term_doc_matrix",":","TermDocMatrix","Term","document","matrix","object","to","compact","non_text",":","bool","Use","non-text","features","instead","of","terms","Returns","--","--","--","-","New","term","doc","matrix"]
code: def compact(
      self,
      term_doc_matrix: TermDocMatrixWithoutCategories,
      non_text: bool = False,
  ):
      """
      Parameters
      ----------
      term_doc_matrix : TermDocMatrix
          Term document matrix object to compact
      non_text : bool
          Use non-text features instead of terms
  
      Returns
      -------
      New term doc matrix
      """
      pass
  
file_path: scattertext/scattertext/termcompaction/ngram_percentage_compactor.py
imports: import abc
  import pandas
  from tqdm.auto import tqdm
  from scattertext.TermDocMatrixWithoutCategories import TermDocMatrixWithoutCategories
  from scattertext.features.featoffsets.flexible_ngram_features import sequence_window
  from scattertext.termranking import AbsoluteFrequencyRanker
label_desc: Use image node_id 1 for calling the BaseTermCompactor obj's underlying member method code with example usage: obj.compact(term_doc_matrix, non_text) without return types