我有这个:
texts = ['human', 'machine', 'interface']
当我使用Gensim进行此操作时:
dictionary = corpora.Dictionary(texts)
它会导致添加Unicode u'
的...如何抑制它?
如果您认为错误是因为Unicode,则可以尝试。
u'whateveryourwtring'.encode('ascii', 'ignore')
u'aあä'.encode('ascii', 'ignore')