docstr: Constructs the term doc matrix.
  
  Returns
  -------
  scattertext.ParsedCorpus.ParsedCorpus
docstr_tok: ["Constructs","the","term","doc","matrix",".","Returns","--","--","--","-","scattertext.ParsedCorpus.ParsedCorpus"]
code: def build(self, show_progress=False) -> ParsedCorpus:
      """Constructs the term doc matrix.
  
      Returns
      -------
      scattertext.ParsedCorpus.ParsedCorpus
      """
      y = self._get_y_and_populate_category_idx_store(
          self._df[self._category_col].apply(str)
      )
      if show_progress is True:
          self._df.progress_apply(self._add_to_x_factory, axis=1)
      else:
          self._df.apply(self._add_to_x_factory, axis=1)
      self._mX = self._mX_factory.set_last_row_idx(
          len(y) - 1
      ).get_csr_matrix()
      return ParsedCorpus(
          df=self._df,
          X=self._X_factory.set_last_row_idx(
              len(y) - 1
          ).get_csr_matrix(),
          mX=self._mX_factory.set_last_row_idx(
              len(y) - 1
          ).get_csr_matrix(),
          y=y,
          term_idx_store=self._term_idx_store,
          category_idx_store=self._category_idx_store,
          metadata_idx_store=self._metadata_idx_store,
          parsed_col=self._parsed_col,
          category_col=self._category_col,
      )
  
file_path: scattertext/scattertext/CorpusFromParsedDocuments.py
imports: import numpy
  from scattertext.CSRMatrixTools import CSRMatrixFactory
  from scattertext.ParsedCorpus import ParsedCorpus
  from scattertext.features.FeatsFromSpacyDoc import FeatsFromSpacyDoc
  from scattertext.indexstore.IndexStore import IndexStore
label_desc: Use image node_id 2 for calling the CorpusFromParsedDocuments obj's underlying member method code with example usage: obj.build(show_progress) and returns: ParsedCorpus