Skip to content

Repository files navigation

VADER Text Sentiment Analyzer

🔎 Sentiment analysis from web pages or text using VADER + Portuguese lexical adaptation


📌 Overview

This project performs sentiment analysis on textual content extracted from web pages or raw text. The system accepts a URL or text input, retrieves the content, processes it, and returns a sentiment classification.

It combines:

  • Original VADER rule-based sentiment engine (optimized for social media text)
  • Portuguese lexical adaptation for improved analysis in PT-BR
  • Web scraping module for content extraction

⚙️ Features

  • Analyze sentiment from a URL
  • Analyze pasted text
  • Portuguese + English support
  • Rule-based NLP (fast + explainable)
  • Modular architecture
  • Ready for integration into pipelines or APIs

🧠 How it Works

  1. Receives a URL or text
  2. Extracts textual content
  3. Normalizes text
  4. Applies lexicon rules
  5. Computes sentiment score
  6. Returns classification

Output example:

Sentiment: Positive
Score: 0.78

🧱 Project Structure

project/
│
├── projeto.py            → main execution script
├── data_access.py        → web content extraction
├── text_paste.py         → manual text input
├── center.py             → processing core
├── credit.py             → credits module
├── lexicons/             → sentiment lexicons
├── requirements.txt
└── README.md

🚀 Installation

git clone https://github.com/eduardo-data/VADER_text_sentiment
cd VADER_text_sentiment
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt

▶️ Usage

Analyze a webpage

python projeto.py --url "https://example.com/article"

Analyze text

python projeto.py --text "This news is amazing!"

📊 Methodology

This project uses a lexicon + rule-based approach, not machine learning.

Advantages:

  • deterministic
  • explainable scores
  • fast execution
  • no training required

📚 Credits & References

English Model

Hutto, C.J. & Gilbert, E.E. (2014). VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text. Proceedings of the 8th International AAAI Conference on Weblogs and Social Media (ICWSM-14).


Portuguese Adaptation

Almeida, Rafael J. A. (2018). LeIA — Léxico para Inferência Adaptada


📜 License

MIT License — free for academic and commercial use.


👨‍💻 Author

Luiz Eduardo Data & NLP Projects

Github - https://github.com/eduardo-data

Linkedin - https://www.linkedin.com/in/luizeduardodatascientist/


⭐ Contributing

Pull requests are welcome. For major changes, open an issue first to discuss what you would like to change.


🔮 Future Improvements

  • API version
  • Web interface
  • Batch analysis
  • Topic modeling integration
  • Visualization dashboard

If this project helped you, consider giving it a ⭐

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages