# πͺπΉ Amharic DBpedia: LLM-Based RDF Extraction Pipeline
## π Overview
> Built as part of exploration for DBpedia GSoC (Amharic LLM Pipeline project)
This project presents a prototype pipeline for extracting structured knowledge from unstructured text and converting it into RDF triples aligned with the DBpedia Ontology.
It is designed as part of the GSoC exploration for automating knowledge graph construction in the Amharic DBpedia chapter using Large Language Models (LLMs).
---
## β οΈ Problem Statement
Wikipedia contains vast amounts of unstructured data, especially in low-resource languages like Amharic. Converting this into Linked Open Data (LOD) remains largely manual or semi-automated.
This project aims to automate:
* Entity extraction
* Relation prediction
* Ontology-aligned RDF generation
using LLMs while ensuring semantic correctness through ontology validation.
---
## ποΈ Architecture
```text
Text Input (Amharic / English)
β
LLM Extraction (Real / Mock)
β
Structured JSON (Entities + Relations)
β
Entity Normalization
β
Ontology Mapping & Validation
β
RDF Triple Generation (rdflib)
β
FastAPI Backend β UI Layer
```
---
## β¨ Features
* **Modular Pipeline**
Separate components for extraction, normalization, mapping, and RDF generation
* **LLM Integration**
Supports real LLMs with fallback mock system for reliability
* **Ontology-Aware Mapping**
Aligns predicates with DBpedia ontology (`dbo:` namespace)
* **Class + Relation Prediction**
Generates both `rdf:type` and relationship triples
* **RDF Output (Turtle)**
Standardized and reusable knowledge graph format
* **API Support**
FastAPI backend with interactive Swagger documentation
* **End-to-End Demo**
UI + API integration for real-time testing
---
## π Project Structure
```text
amharic-dbpediallm-pipeline/
βββ pipeline/
β βββ extractor.py # LLM / mock extraction
β βββ normalizer.py # Entity normalization
β βββ mapper.py # Ontology mapping
β βββ rdf_generator β¦