내가 파이썬 책 건물 기계 학습 시스템 "의 주제 모델링/잠재 디리클레 할당 (LDA)에 튜토리얼을 따라하려고BleiCorpus과 AP 통신 데이터 세트 :. IO 오류
너무 사라하지 않은 지금까지이 책과 주제 모델링의 첫 번째 부분에서 나에게 오류를 반환 :
는from gensim import corpora, models, similarities
corpus = corpora.BleiCorpus('./data/ap/ap.dat', './data/ap/vocab.txt')
오류 :
63
64 self.fname = fname
---> 65 with utils.smart_open(fname_vocab) as fin:
66 words = [utils.to_unicode(word).rstrip() for word in fin]
67 self.id2word = dict(enumerate(words))
/Users/user/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/gensim/utils.pyc in smart_open(fname, mode)
659 from gzip import GzipFile
660 return make_closing(GzipFile)(fname, mode)
--> 661 return open(fname, mode)
662
663
IOError: [Errno 2] No such file or directory: './data/ap/vocab.txt'
vocab.txt 파일이 존재하지 않습니다, 하지만 있어야 할 디렉토리로 전환, 나는 다음과 같은 발견 :
는 AP 데이터는 별도로 (책에서 언급되지 않은)를 다운로드 할 필요가 마치$ ls download_ap.sh download_wp.sh preprocess-wikidata.sh
, 이렇게 너무 :
sh download_ap.sh
내가이 얻을 :
download_ap.sh: line 2: wget: command not found
tar: Error opening archive: Failed to open 'ap.tgz'
아무도이 문제를 해결하는 방법을 알고 있습니까? 당신은 Cygwin에서와 Windows를 사용하는 컴퓨터에 설치 wget을하지 않는