File size: 2,230 Bytes
d7256a9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | # QUS-AI Project Structure
This document outlines the modular architecture of the QUS-AI Islamic Alignment Framework (v2).
```text
QUS-AI/
βββ qusai_core/ # [CORE PACKAGE] Main framework logic
β βββ __init__.py # Package definition
β βββ alignment/ # [MIZAN] Alignment & Safety Logic
β β βββ __init__.py
β β βββ mizan.py # The 5-point Salat Validation Checkpoints
β βββ ontology/ # [TAWHID] Knowledge Graph Engine
β β βββ __init__.py
β β βββ engine.py # RDF loading, traversing, and context lookup
β βββ llm/ # [AKL] Model Abstraction Layer
β β βββ __init__.py
β β βββ loader.py # HuggingFace/Torch loader (CPU/GPU agnostic)
β βββ pipeline/ # [AMAL] Execution Pipeline
β β βββ __init__.py
β β βββ middleware.py # Connects Input -> Validator -> Ontology -> Model
β βββ utils/ # Shared utilities
β βββ __init__.py
β βββ constants.py # URI Namespaces (ALIGN, QURAN, ROOT) and Paths
β
βββ data/ # [DATA] Ontologies and Rules
β βββ quran_root_ontology_v3.ttl # The main RDF Knowledge Graph
β βββ quranic_grammar_rules.json # JSON-based grammar logic
β
βββ docs/ # Project Documentation
β βββ 00_axioms.md
β βββ README_V2.md
β βββ ...
β
βββ qusai_app.py # [ENTRY] Main Gradio Application Entry Point
βββ requirements.txt # Python dependencies
βββ README.md # GitHub landing page & HF Metadata
```
## Key Directory Descriptions
- **`qusai_core/`**: This is the heart of the application. It is designed to be portable. You can copy this folder into any other Python project to give it "Quranic Alignment" capabilities.
- **`data/`**: specific data files loaded by `ontology/engine.py`.
- **`qusai_app.py`**: A lightweight wrapper that initializes `qusai_core.pipeline.middleware` and launches the UI.
|