这就是我所拥有的:
myGrammar = nltk.data.load('file:C:\Users\Jay\Documents\buffalo.cfg')
我得到的错误是:
`Traceback (most recent call last):
File "C:\Users\Jay\Documents\Assignment9.py", line 8, in <module>
myGrammar = nltk.data.load( 'file:C:\Users\Jay\Documents\buffalo.cfg')
File "C:\Python27\lib\site-packages\nltk\data.py", line 610, in load
resource_val = nltk.grammar.parse_cfg(_open(resource_url).read())
File "C:\Python27\lib\site-packages\nltk\data.py", line 689, in _open
return open(path, 'rb')
IOError: [Errno 22] invalid mode ('rb') or filename: 'C:\\Users\\Jay\\Documents\x08uffalo.cfg'`
有谁知道我的网址应该是什么?为什么我在错误中得到 x08 而不是 b?