【发布时间】:2018-12-10 15:26:06
【问题描述】:
我有一个数据框:
train_review = train['review']
train_review
看起来像:
0 With all this stuff going down at the moment w...
1 \The Classic War of the Worlds\" by Timothy Hi...
2 The film starts with a manager (Nicholas Bell)...
3 It must be assumed that those who praised this...
4 Superbly trashy and wondrously unpretentious 8...
我将标记添加到字符串中:
train_review = train['review']
train_token = ''
for i in train['review']:
train_token +=i
我想要的是使用 Spacy 对评论进行标记。 这是我尝试过的,但出现以下错误:
参数“字符串”的类型不正确(预期为 str,得到 spacy.tokens.doc.Doc)
我该如何解决?提前致谢!
【问题讨论】: