Logo Lanfrica

nardosdubale1064/amharic_hate_speech_detection

Domain:

natural language processing

Record type:

softwaremodel
Creator:
nar
Host:
# πŸ—£οΈ Amharic Social Media Hate Speech Analyzer A web-based NLP tool for detecting **hate speech**, **offensive**, and **normal** content in **Amharic** text collected from public Telegram channels and groups. Built for educational and research purposes, this project demonstrates practical applications of Natural Language Processing for low-resource languages. ## πŸš€ Features * **πŸ” Web Interface** Simple and clean web form where users input Telegram URLs to view categorized analysis results. * **🧹 Amharic Text Preprocessing** Custom normalization for Amharic characters, removal of URLs, mentions, hashtags, emojis, and a comprehensive stopword list. * **βœ‚οΈ Sentence-Level Tokenization** Breaks down long messages and comments into individual sentences for more detailed classification. * **🧠 Machine Learning Model** Logistic Regression classifier using TF-IDF features, trained on `uhhlt/amharichatespeechranlp` dataset. * **πŸ“‘ Telegram Scraper (Telethon)** Asynchronously fetches: * Comments from a specific Telegram post. * Messages (and their comments) from channels or groups. * Automatically detects message type (channel/group) and supports a custom message limit (default: 1000). * **πŸ“Š Result Summary** Shows: * Number of messages/comments scraped * Total sentences analyzed * Category breakdown: hate, offensive, and normal * Example sentences for each category * **🧩 Modular Design** Code is organized for readability and reusability using separate modules. --- ## πŸ“ Project Structure ```plaintext amharic_hate_speech_analyzer/ β”œβ”€β”€ config.py # Configuration settings (API keys, model paths, label mapping) β”œβ”€β”€ amharic_preprocessing.py # Amharic text cleaning, normalization, and tokenization β”œβ”€β”€ model_trainer.py # Model training and saving script β”œβ”€β”€ telegram_scraper.py # Telegram data fetching logic (messages + comments) β”œβ”€β”€ server.py # Main Flask web application β”œβ”€β”€ …