-
Install dependencies:
pip install -r requirements.txt
-
Run the API:
uvicorn app.main:app --reload
The API expects the glossary JSON at ../data/glossary.json.
First semantic search will download the embedding model. Set HF_TOKEN for faster Hugging Face downloads if needed.
GET /health-> service statusGET /version-> dataset metadataGET /terms/{term}-> exact term lookup (case-insensitive)GET /terms-> list terms with filters and paginationGET /search?q=...-> search in term/definition (filters + pagination)GET /semantic-search?q=...-> vector search (filters + pagination)POST /annotate-> annotate text with glossary termsPOST /annotate/batch-> annotate multiple textsGET /metrics-> basic request timing and counts
Supported query params:
limit(default varies)offset(default 0)has_alias(true/false)language(english/arabic/french)source(matches sheet name)