“ TclError:没有显示名称,没有$ DISPLAY环境变量” nltk中出现错误

问题描述 投票:0回答:1
news="U.S. President Donald Trump said on Tuesday he and Chinese President Xi Jinping will have a signing ceremony to sign the first phase of the U.S.-China trade deal agreed to this month."

news_token=word_tokenize(news) 

news_pos=nltk.pos_tag(news_token)

news_entity=ne_chunk(news_pos)

news_entity

尽管我得到了输出,但同时发生了tcl错误。image

python machine-learning nlp nltk named-entity-recognition
1个回答
0
投票

我运行了代码,对我来说很好用...

enter image description here

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