MediaUncovered / NewsAnalysis

use word embeddings to uncover bias in newspapers
5 stars 1 forks source link

Articles can be downloaded and resumed #17

Closed todorus closed 6 years ago

todorus commented 6 years ago

PR for #16

example of how to download articles

from data import model
from data import collect

engine = model.engine(
    database_user=database_user,
    database_password=database_password,
    database_host=database_host,
    database_port=database_port,
    database_name=database_name
)

session = model.session(engine)

collect.download_articles_to_file(session, "articles.csv")

Then afterwards you can run python createModel.py input.csv output.w2vec to generate the model

Tilana commented 6 years ago

Great! Some things: MAybe we can find a better name for the data module. Data is too generic and often used as a folder to save raw data files...

todorus commented 6 years ago

Instead of a 'data' folder, what about 'datastore'?

Tilana commented 6 years ago

datastore is perfect!