grammar = nltk.data.load(r'C:\Users\dell\AppData\Local\Temp\mmm.cfg')
print(grammar)
就是系统不知道你的nltk是什么,在这一行,没有定义这个变量