Skip to content

Latest commit

 

History

History
90 lines (65 loc) · 3.99 KB

README.md

File metadata and controls

90 lines (65 loc) · 3.99 KB

NewsMood Analyzer

NewsMood is your go-to platform for insightful news sentiment analysis. Whether you're curious about the latest trending topic or want to delve into the emotional landscape of a specific event, we've got you covered. Simply enter a keyword, and our sophisticated sentiment analysis engine will sift through thousands of news articles, bringing you not just the information, but the emotional pulse of the story.

Project Highlights

  • Django Web App

    • Developed a web application using Django.
    • Implemented views, templates, and models for data handling.
  • NewsAPI Integration

    • Used NewsAPI to fetch real-time news articles based on specific queries.
    • Processed JSON responses to extract relevant news data.
  • Web Scraping

    • Implemented web scraping techniques to gather supplementary news content.
    • Used BeautifulSoup for parsing and extraction.
  • Sentiment Analysis with RoBERTa

    • Integrated a pretrained RoBERTa model for sentiment analysis.
    • Applied natural language processing techniques to determine sentiment (positive, negative, neutral).

Technologies Used

  • Backend: Python, Django
  • API: NewsAPI
  • Web Scraping Tools: BeautifulSoup, Scrapy
  • Machine Learning/NLP: RoBERTa, Hugging Face Transformers

Project Workflow

  1. Data Collection

    • Utilizes NewsAPI to fetch recent news articles.
    • Scrapes additional content from relevant websites for enriched dataset.
  2. Data Processing

    • Parses and cleans data retrieved from NewsAPI and web scraping.
    • Normalizes text, removes HTML tags, and prepares data for sentiment analysis.
  3. Sentiment Analysis

    • Applies RoBERTa model for sentiment analysis of news articles.
    • Classifies sentiment into categories such as positive, negative, or neutral.
  4. Presentation

    • Displays news articles along with sentiment analysis results.
    • Implemented using Django web framework for a user-friendly interface.

Installation

Python and Django need to be installed

  pip install -r requirements.txt

Go to sentiment_analysis folder

  python manage.py runserver

NOTE - you need to create .env file and environmental variable 'NEWS_API_KEY' in the .env file. Then go to the browser and enter the url http://127.0.0.1:8000/

Login and Signup

Users can register through register page. Then, user can login through login page.

You can access the django admin page at http://127.0.0.1:8000/admin and login with username 'admin' and password 'admin@123'.

Also a new admin user can be created using

  python manage.py createsuperuser

Screenshots

Screenshot 2024-06-15 125733 Screenshot 2024-06-15 130036 Screenshot 2024-06-15 130054 Screenshot 2024-06-15 130113 Screenshot 2024-06-15 125903 Screenshot 2024-06-15 125923 Screenshot 2024-06-15 125946 Screenshot 2024-06-15 130008 Screenshot 2024-06-15 133917

Acknowledgements

  • NewsAPI for providing access to news articles.
  • OpenAI for the RoBERTa model and Transformers library.