Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where to get /home/ub16c9/nltk_data/corpora/stopwords/chinese #2

Open
SeekPoint opened this issue Jun 23, 2019 · 0 comments
Open

where to get /home/ub16c9/nltk_data/corpora/stopwords/chinese #2

SeekPoint opened this issue Jun 23, 2019 · 0 comments

Comments

@SeekPoint
Copy link

ub16c9@ub16c9-gpu:/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/myDuReader/preprocess_ml$ python3.6 pre_ml.py data/zhidao/ data/zhidao_82/zhidao.test.json gendata/zhidao_82/zhidao.test sfile/zhidao_82/zhidao.test.result
Traceback (most recent call last):
File "pre_ml.py", line 235, in
main()
File "pre_ml.py", line 231, in main
preprocess(filedir,filename,targetfile,safile)
File "pre_ml.py", line 202, in preprocess
tfidfObj = TfidfVectorizer(sublinear_tf=True, max_df=0.5, stop_words=stopwords.words('chinese'))
File "/usr/local/lib/python3.6/dist-packages/nltk/corpus/reader/wordlist.py", line 25, in words
for line in line_tokenize(self.raw(fileids))
File "/usr/local/lib/python3.6/dist-packages/nltk/corpus/reader/wordlist.py", line 34, in raw
return concat([self.open(f).read() for f in fileids])
File "/usr/local/lib/python3.6/dist-packages/nltk/corpus/reader/wordlist.py", line 34, in
return concat([self.open(f).read() for f in fileids])
File "/usr/local/lib/python3.6/dist-packages/nltk/corpus/reader/api.py", line 213, in open
stream = self._root.join(file).open(encoding)
File "/usr/local/lib/python3.6/dist-packages/nltk/data.py", line 355, in join
return FileSystemPathPointer(_path)
File "/usr/local/lib/python3.6/dist-packages/nltk/compat.py", line 228, in _decorator
return init_func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/nltk/data.py", line 333, in init
raise IOError('No such file or directory: %r' % _path)
OSError: No such file or directory: '/home/ub16c9/nltk_data/corpora/stopwords/chinese'
ub16c9@ub16c9-gpu:/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/myDuReader/preprocess_ml$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant