Logo Lanfrica

ThatAfricanKid33/africana-gateway

Domaine:

natural language processing

Type de record:

software
Créateur:
Tha
Hôte:
Africana: open-source semantic synthesis engine for African language evolution. # Africana API — FastAPI Prototype A FastAPI prototype of the **Africana Semantic Synthesis Engine** — a computational framework for generating culturally-grounded vocabulary in African languages through cross-lingual vector synthesis, probabilistic weighting, and morphological reconstruction. --- ## Quick Start ```bash # 1. Install dependencies pip install fastapi uvicorn numpy scikit-learn python-multipart httpx # 2. Run the server uvicorn main:app --reload --port 8000 # 3. Open interactive docs open localhost # 4. Run the test suite (no server needed) python test_api.py ``` --- ## Project Structure ``` africana_api/ ├── main.py ← FastAPI app, route definitions, OpenAPI metadata ├── engine.py ← Full 9-stage synthesis pipeline + AfricanaEngine class ├── models.py ← Pydantic request/response schemas ├── test_api.py ← Endpoint test suite (uses TestClient, no server needed) └── README.md ``` --- ## API Endpoints | Method | Endpoint | Description | |--------|---------------------------------|-------------------------------------------| | POST | `/api/v1/generate` | Full synthesis pipeline → new word | | POST | `/api/v1/validate` | Validate a proposed word (no generation) | | POST | `/api/v1/feedback` | Submit adoption signal (reinforce/decay) | | GET | `/api/v1/dictionary/{language}` | Paginated dictionary for a language | | GET | `/api/v1/languages` | List all supported languages + metadata | | POST | `/api/v1/trace` | Full pipeline trace (research/debug mode) | | GET | `/api/v1/stats` | Engine-wide statistics | --- ## Example: Generate a Word ```bash curl -X POST localhost \ -H "Content-Type: application/json" \ -d '{ "language": "shona", "concept": "algorithm", "context": "computer science", "alpha": …