Giter VIP home page Giter VIP logo

news_classifier's Introduction

News Classifier

Simple machine learning and analysis applied to news.

Installing Dependencies

After installing Homebrew, download and install Mongo and GSL by running the following from the project root:

brew install mongodb
brew install gsl # improves classification performance

Ensure that Mongo is running with:

brew services start mongodb

After installing Ruby and Bundler, run the following from the project's root to install necessary gem dependencies:

bundle install

After installing Node and NPM, run the following from the project's root:

npm install

## Crawling News Sources

To crawl news sources and save their content to the `articles` collection of the `news_classifier` database, run the following from the project root:

```shell
ruby scripts/crawl.rb

To drop the articles collection before crawling, add the --drop-collection option:

ruby scripts/crawl.rb --drop-collection

Classifying Content

Once the news sources have been crawled, run the following command to launch the interactive classifier:

ruby scripts/classify.rb

Finding Related Content

Once the news sources have been crawled, run the following command to find content related to provided strings:

ruby scripts/find_related.rb

Sentiment Analysis

Onde the news sources have been crawled, run the following command to calculate the average sentiment for each source.

node scripts/sentiment.js

news_classifier's People

Watchers

 avatar

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.