docstr: Returns
  -------
  CorpusDF
docstr_tok: ["Returns","--","--","--","-","CorpusDF"]
code: def build(self):
      """
      Returns
      -------
      CorpusDF
      """
      if self.text_df is not None:
          if self.parsed_col is not None:
              if self.category_col is None:
                  self.text_df = self.text_df.assign(
                      Category=self.category_idx_store.getvalbatch(
                          self.y
                      )
                  )
                  self.category_col = "Category"
              return ParsedCorpus(
                  df=self.text_df,
                  X=self.X,
                  mX=self.mX,
                  y=self.y,
                  parsed_col=self.parsed_col,
                  term_idx_store=self.term_idx_store,
                  category_idx_store=self.category_idx_store,
                  metadata_idx_store=self.metadata_idx_store,
                  unigram_frequency_path=self.unigram_frequency_path,
                  category_col=self.category_col,
              )
          elif self.text_col is not None:
              return CorpusDF(
                  df=self.text_df,
                  X=self.X,
                  mX=self.mX,
                  y=self.y,
                  text_col=self.text_col,
                  term_idx_store=self.term_idx_store,
                  category_idx_store=self.category_idx_store,
                  metadata_idx_store=self.metadata_idx_store,
                  unigram_frequency_path=self.unigram_frequency_path,
              )
      return TermDocMatrix(
          X=self.X,
          mX=self.mX,
          y=self.y,
          term_idx_store=self.term_idx_store,
          category_idx_store=self.category_idx_store,
          metadata_idx_store=self.metadata_idx_store,
          unigram_frequency_path=self.unigram_frequency_path,
      )
  
file_path: scattertext/scattertext/CorpusFromTermFrequencies.py
imports: from typing import Optional, List
  import pandas
  import numpy
  from scipy.sparse import csr_matrix
  from scattertext.ParsedCorpus import ParsedCorpus
  from scattertext.TermDocMatrix import TermDocMatrix
  from scattertext.CorpusDF import CorpusDF
  from scattertext.indexstore import IndexStore, IndexStoreFromList
label_desc: Use image node_id 2 for calling the CorpusFromTermFrequencies obj's underlying member method code with example usage: obj.build() and returns: TermDocMatrix, ParsedCorpus, CorpusDF