Giter Club home page Giter Club logo

news-sentiment-analysis's Introduction

News Sentiment Analysis

The program crawls moneycontrol and economictimes to fetch data of companies listed in the input.xlsx file. Once the data is scraped and a csv file is built, relative analysis is done using analyse.py to classify the companies into RED, AMBER and GREEN. Absolute scoring is done using the score.py script.

The master branch contains the source code for the application.
dist-windows branch contains the exe files and support files independant of the python installation.

Setup:

  1. Click Clone or Download and then Download ZIP button to download the application.
  2. Extract all files to a folder and run the applications as specified below.

How to run:

  1. Make changes to input.xlsx (Configuration settings given below)
  2. Run News Scraper.exe
  3. Output is stored in Scrape Output.csv
  4. Run Score Generator.exe and Scrape Analyser.exe for analysing scraped content.
  5. Output is stored in Score Output.xlsx and Analyse Output.xlsx respectively

icons

Application input.xlsx columns Output File
News Scraper.exe A to F Scrape Output.csv
Score Generator.exe H to L Score Output.xlsx
Scrape Analyser.exe I to L Analyse Output.xlsx

input.xlsx

news scraper input

Parameter Ideal Value Description
COMPANYNAME String, exact match Enter company names as close to the company name listed on the stocks page of Economic Times and Money Control.
THRESHOLD 0.75 to 0.85 This is the percentage match between input company names and website listed company names.
DATEFROM DD-MM-YYYY Data from this period will be scraped
DATETO DD-MM-YYYY Data till this period will be scraped
WEBSITE Select at least one site Moneycontrol or Economictimes
ROTATING_PROXIES 0 to 100
0 = No proxy
Used to bypass bans while scraping. Increasing proxy number might lead to slower data Scraping.

score generator, scrape analyser

Parameter Ideal Value Description
POSITIVE_KEYWORDS String Positive Keywords list
NEGATIVE_KEYWORDS String Negative Keywords list
SEARCH OPTION Article Title or Article Content Select which content you want the program to analyse
N_STDDEV_RED Float (0.5, 1, 1.5, 2) If keyword count greater than mean + (N_STDDEV_RED * stddev) then the company is labelled RED
N_STDDEV_AMBER Float (0.5, 1, 1.5, 2) If keyword count greater than mean + (N_STDDEV_AMBER * stddev) then the company is labelled AMBER

License and Copyright

Licensed under the MIT License

news-sentiment-analysis's People

Contributors

atulyakumar97 avatar

Watchers

James Cloos 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.