如何解决使用nltk时,在将python文件导出到exe时遇到问题
我对编码很陌生,在使用nltk的代码中将python文件导出到.exe文件时遇到了问题。
这是我的代码。
from PyDictionary import PyDictionary
from nltk.corpus import words
import random
import pyautogui
import time
dictionary=PyDictionary()
time.sleep(1)
while True:
ran = random.randint(1,236736)
word_list = words.words()
correct_word = (dictionary.meaning(word_list[ran]))
propper_formating = "%s meaning: %s " % (word_list[ran],correct_word)
no_none = propper_formating.count("None")
if no_none == 0:
pyautogui.write(propper_formating)
pyautogui.press("enter")
quit()
有人知道发生了什么吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。