在使用吡咯烷酮在cassandra中插入数据时存在编码问题。字段名为“text”,内容为tweet,可以具有非ascii字符。我试着用编码(‘UTF-8’)对文本字段进行编码,它显示,从'unicode‘转换为'str’,但仍然失败?准确的错误就在这里,
-'ascii' codec can't encode character u'\xbf' in position 0: ordinal not in range(128).编辑1:对
我从我的postgresql数据库中检索了一堆文本记录,并打算在分析这些文本文档之前对它们进行预处理。我想对文档进行标记化,但在标记化过程中遇到了一些问题 #toToken is the text stringtoTokens)
错误是TypeError: descriptor 'strip' requires a 'str' object but received a 'unicode'我很好奇,当数据