Skip to content

Getting hacker news example working #93

@thommiano

Description

@thommiano

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions