cemoody / lda2vec

MIT License
3.15k stars 629 forks source link

Getting hacker news example working #93

Open thommiano opened 5 years ago

thommiano commented 5 years ago

To get preprocess.py running for Hacker News, I did the following from the lda2vec root:

mkdir ./examples/hacker_news/lib
cp -r ./lda2vec ./examples/hacker_news/lib/

In the hacker_news data/preprocess.py file I added the following:

import sys
sys.path.append('./lib')

In the hacker_news lda2vec module in /lib , I added the following to preprocess.py:

import spacy
spacy.load('en')
from spacy.lang.en import English
# from spacy.en import English

In my python environment I did the following:

python -m spacy download en

Note that pandas is a requirement. Then, in lda2vec/exampels/hacker_news you can run python ./data/preprocess.py Will update if I get everything else working.

amitbikram2913 commented 5 years ago

Have you been able to run the remaining part as well? Are there any more changes that need to be made?