GithubHelp home page GithubHelp logo

propnews's People

Watchers

 avatar  avatar  avatar  avatar

propnews's Issues

Make log more robust

  • Convert error_log.txt into an SQL table
  • Make the log if it doesn't exist. Otherwise, append to the log.
  • Add the log to .gitignore so that when you pull the repo you don't have to discard the old log

Investigate the optimal call frequency of NewsAPI

We are limited by page_limit_per_request=10 and results_per_page=100. Is it possible that, as we increase the list of news sources we search, we hit the limit that NewsAPI can return in a single call, and we therefore need to query NewsAPI more frequently?

get_bbc_content doesn't get full content

Seems to me that get_full_content.get_bbc_content() doesn't return the full content of a corresponding BBC article. The text isn't precisely the same. Is this a concern?

Numbers as a necessary condition for non-zero score

score_articles.score_article should search the article content for (large?) numbers, and words like: double, triple, halve, third, percent, and require that the article pass this test in order to receive a non-zero score.

Duplicate tweets

Twitter doesn't allow you to tweet the same thing twice. Currently, if main.py attempts to tweet the same tweet twice, we write to error_log.txt, but really we ought to keep sampling articles until something new comes up.

Doc2Vec NLP

Using Doc2Vec as a substitute for search strings in assigning scores to articles

Make clean NewsAPI Key

The security of the API key we are currently using is compromised. We should make another.

get_articles.get_url_content always returns ''

get_articles.get_url_content() never appears to be able to get URL contents. I performed the following experiment. In get_articles.py, I added the lines

content = get_url_content(url_path, url)
                if len(content) > 0:
                    pass

and set a breakpoint at pass. The code never entered the line 'pass' after searching > 100 articles. This doesn't seem right.

SQL Primary keys

Currently using the URL as the primary key in news.db, but integer primary keys are more efficient. Consider hashing the URL?

Set debug mode as a flag

Whilst debugging the code, we don't necessarily want to call the API heavily. There currently exists an argument dbg_mode for tweeting.tweet_news. This should be set as a command line flag for running main.py

$ ipython
$ run main.py -d

Redundant files/clean up

Some files like run.sh and ranked_articles.csv don't seem to do anything. Do some spring cleaning.

Filter categories from API

We are currently taking all news from a vendor, but certain categories are (more or less) guaranteed to be irrelevant, e.g. sport. We can filter out a lot of noise by avoiding certain categories at the level of API calls.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.