From e1e6bfcd7f675b73e7eab6284ed5390738368e48 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 29 Mar 2024 15:20:40 +0700 Subject: [PATCH] dbscan clusters on story features --- .github/workflows/on_push.yml | 2 +- main.py | 6 +++--- setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml index fe56766..f8f5c86 100644 --- a/.github/workflows/on_push.yml +++ b/.github/workflows/on_push.yml @@ -34,7 +34,7 @@ jobs: run: | source dots/bin/activate python -m spacy download en_core_web_sm - python DOTS/test/test_dots_feat.py -n 5 -f 3 -s 1 -o dots_feats.csv + python DOTS/test/test_dots_feat.py -n 5 -f 3 -d 4 -o dots_feats.csv env: OS_TOKEN: ${{ secrets.OS_TOKEN }} LOBSTR_KEY: ${{ secrets.LOBSTR_KEY }} diff --git a/main.py b/main.py index 7a3d2be..e970e9a 100644 --- a/main.py +++ b/main.py @@ -80,13 +80,13 @@ def main(args): articles = get_google_news('disaster') dname = 'google2_' elif args.d == 3: - articles = pull_lobstr_gdoc() + articles = pull_lobstr_gdoc(args.n) dname = 'lobstr3_' elif args.d == 4: - response = get_test_gnews(100) + response = get_test_gnews(args.n) hits = response["hits"]["hits"] articles = pull_data(hits) - dname = 'test_gnews _' + dname = 'test_gnews_' rank_articles = [] if device == 'cuda': dataloader = DataLoader(data['text'], batch_size=1, shuffle=True, num_workers=4) diff --git a/setup.py b/setup.py index d380659..e99b995 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ 'nltk', 'numpy', 'GNews', - 'graphistry[umap-learn]' + 'graphistry[umap-learn]', 'umap-learn' ]