def get_term_doc_mat(self, non_text: bool = False) -> csr_matrix:
        '''
        Returns sparse matrix representation of term-doc-matrix

        Returns
        -------
        scipy.sparse.csr_matrix
        '''
        if non_text:
            return self.get_metadata_doc_mat()
        return self._X

        Returns sparse matrix representation of term-doc-matrix

        Returns
        -------
        scipy.sparse.csr_matrix
        
scattertext/TermDocMatrixWithoutCategories.py