QOSAI / PROJECT_STRUCTURE.md
QalamABD's picture
Upload 32 files
d7256a9 verified
|
Raw History Blame Contribute Delete
2.23 kB
# 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.