如何添加将所有NLP功能添加到数据框中

问题描述 投票:0回答:1

我首先制作了数据框

def pre_processing_songs_nlp(df):
      print('Extracting NLP features...')
      df['NLP Features'] = df['Cleaned Lyrics'].progress_apply(lambda x: nlp_pipeline(x))
      df = df.dropna()

然后我试图将所有NLP功能添加到数据框中

new_df = pre_processing_songs_nlp(new_df)

但是它给出了一些错误,例如-

    0%|          | 0/5796 [00:00<?, ?it/s]
Extracting NLP features...
error: bad escape \p

有人可以帮我吗?

python nlp spacy feature-extraction
1个回答
0
投票

我还检查了像enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.