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

时间:2019-12-26 07:21:13

标签: python machine-learning nlp nltk named-entity-recognition

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

1 个答案:

答案 0 :(得分:0)

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

enter image description here