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):
      """Constructs the term doc matrix.
  
      Returns
      -------
      scattertext.ParsedCorpus.ParsedCorpus
      """
      self._y = self._get_y_and_populate_category_idx_store()
      self._df.apply(self._add_to_x_factory, axis=1)
      self._X = self._X_factory.set_last_row_idx(
          len(self._y) - 1
      ).get_csr_matrix()
      self._mX = self._mX_factory.set_last_row_idx(
          len(self._y) - 1
      ).get_csr_matrix()
      if self._parsed_col is not None and self._parsed_col in self._df:
          return ParsedCorpus(
              self._df,
              self._X,
              self._mX,
              self._y,
              self._term_idx_store,
              self._category_idx_store,
              self._metadata_idx_store,
              self._parsed_col,
              self._category_col,
          )
      else:
          return CorpusDF(
              self._df,
              self._X,
              self._mX,
              self._y,
              self._text_col,
              self._term_idx_store,
              self._category_idx_store,
              self._metadata_idx_store,
          )
  
file_path: scattertext/scattertext/CorpusFromFeatureDict.py
imports: import numpy
  from scattertext.CorpusDF import CorpusDF
  from scattertext.CSRMatrixTools import CSRMatrixFactory
  from scattertext.ParsedCorpus import ParsedCorpus
  from scattertext.indexstore.IndexStore import IndexStore
label_desc: Use image node_id 2 for calling the CorpusFromFeatureDict obj's underlying member method code with example usage: obj.build() and returns: ParsedCorpus, CorpusDF