diff --git a/nlp-service/CLAUDE.md b/nlp-service/CLAUDE.md index f7579b7d..821dc996 100644 --- a/nlp-service/CLAUDE.md +++ b/nlp-service/CLAUDE.md @@ -5,13 +5,13 @@ replacing Ollama for the Familienarchiv NL search feature. ## Stack -- Python 3.11, FastAPI 0.115, rapidfuzz 3.x, dateparser 1.2, psycopg2-binary +- Python 3.11, FastAPI 0.115, rapidfuzz 3.x, psycopg2-binary No ML models — persons are matched against the live DB via fuzzy lookup. ## Endpoints -- `POST /parse` — parse a free-text query, return extraction matching `OllamaExtraction` contract +- `POST /parse` — parse a free-text query, return extraction matching `NlpExtraction` contract - `GET /health` — returns `{"status": "ok", "persons_loaded": N}` ## Running locally @@ -51,8 +51,9 @@ See `docs/superpowers/specs/2026-06-07-spacy-nlp-service-design.md`. ## Notes -This is a **prototype** for extraction quality evaluation. No docker-compose integration or -Java-side changes in this iteration. The extraction contract matches `OllamaExtraction` in +This service is fully wired into `docker-compose.yml` (container `archive-nlp`, port 8001 +internal-only) and the Java search path (`RestClientNlpClient` → `NlQueryParserService` → +`NlSearchController`). The extraction contract matches `NlpExtraction` in `backend/src/main/java/org/raddatz/familienarchiv/search/`. Test sentences for manual evaluation are in `test_sentences.md`.