Scaling Tigrinya NLP with LangGraph agents and Qdrant. Automated data acquisition from Haddas Ertra and self-healing linguistic verification.
# Tigrinya Agent - Complete NLP Pipeline
A comprehensive tool for scraping, processing, and analyzing Haddas Ertra Tigrinya newspapers from shabait.com. Features a complete NLP pipeline from raw PDF extraction to advanced linguistic analysis.
## Features
### π₯οΈ **Script Runner UI**
- **Single dashboard**: Run all pipeline scripts (Scraper, PDF Processor, Llama Ingest, Pipeline, Store Data, etc.) from one web interface
- **Live output**: Stream script output in real time
- **Configuration**: Central popup to set scraper limit, Qdrant host/port, collection names, batch sizes
### π₯ **Data Acquisition**
- π·οΈ **Automated Scraping**: Download a configurable number of Haddas Ertra newspaper PDFs (default 20)
- π **Multi-page Navigation**: Handles pagination to access older articles
- π **Smart PDF Detection**: Locates download links using image-based navigation
### π§Ή **Text Processing**
- π **PDF Extraction**: Advanced text extraction from newspaper PDFs
- π **Ge'ez Script Focus**: Preserves only Tigrinya characters, numbers, and punctuation
- π§Ή **Noise Removal**: Eliminates English words, navigation elements, and artifacts
- π **Quality Validation**: Word count verification and content checks
### π€ **NLP Pipeline**
- π·οΈ **Named Entity Recognition**: 3-agent NER pipeline (extract β validate β refine) with Gemini 2.5 Flash
- π **Geopolitical Focus**: PERSON, LOCATION, GPE, ORGANIZATION, DATE, etc.
## Installation
### Prerequisites
- Python 3.8+
- Git
### Step 1: Clone the Repository
```bash
git clone
github.com
cd tigrinya-agent
```
### Step 2: Create Virtual Environment
```bash
python -m venv .env
source .env/bin/activate # On Windows: .env\Scripts\activate
```
### Step 3: Install Dependencies
```bash
pip install -r requirements.txt
```
### Step 4: Install Playwright Browsers
```bash
playwright install chromium
```
### Step 5: Set up Google Gemini API Key
The NER pipeline requires a Google Gemini API key (for ent β¦