def get_score_df(self) -> pd.DataFrame:
        '''
        Computes Schumann (2016) term productivity scores. Requires corpus to have both unigrams and ngrams. Corpus
        should not be compacted.
        '''
        term_freq_df = self.corpus_.get_term_freq_df('')
        ngrams_mask = [' ' in x for x in self.corpus_.get_terms()]

        data = []
        for ngram, ngram_freqs in term_freq_df[ngrams_mask].iterrows():
            for term in ngram.split():
                term_index = self.corpus_.get_term_index(term)
                for category_index, ngram_freq in enumerate(ngram_freqs):
                    data.append([term_index, category_index, ngram_freq])

        ngram_freq_df = pd.DataFrame(data, columns=['TermIndex', 'CategoryIndex', 'NgramFreq'])

        productivity_df = pd.merge(
            ngram_freq_df,
            ngram_freq_df.groupby(
                ['TermIndex', 'CategoryIndex']
            ).sum().rename(
                columns={'NgramFreq': 'TermCatFreq'}
            ).reset_index(),
            on=['TermIndex', 'CategoryIndex']
        ).assign(
            P=lambda df: df.NgramFreq / df.TermCatFreq
        ).dropna().groupby(['TermIndex', 'CategoryIndex']).apply(
            lambda df: -np.sum(df.P * np.log(df.P) / np.log(2))
        ).reset_index().rename(
            columns={0: 'Productivity'}
        )

        return pd.pivot_table(
            productivity_df.assign(
                Term=lambda df: np.array(self.corpus_.get_terms())[df.TermIndex],
                Category=lambda df: np.array(self.corpus_.get_categories())[df.CategoryIndex],
            ),
            index='Term',
            columns='Category',
            values='Productivity'
        ).fillna(0).assign(
            Delta=lambda df: df[self.category_name] - df[self.not_category_names].mean(axis=1)
        )

        Computes Schumann (2016) term productivity scores. Requires corpus to have both unigrams and ngrams. Corpus
        should not be compacted.
        
scattertext/termscoring/Productivity.py