From 8a394ec8c075fe3e9deec45a3010692d765af280 Mon Sep 17 00:00:00 2001 From: Brummel Date: Thu, 16 Apr 2026 17:31:38 +0200 Subject: [PATCH] Add vocabulary files for server initialization Adds three new vocabulary files to the server's vocabulary directory: `anatomy.txt`, `medications.txt`, and `substances.txt`. A README.md is also added to explain their purpose, format, and population strategy. The `server/vocab/raw/` directory is added to `.gitignore`. --- .gitignore | 1 + server/vocab/README.md | 35 +++++++++++++++++++++++++++++++++++ server/vocab/anatomy.txt | 2 ++ server/vocab/medications.txt | 2 ++ server/vocab/substances.txt | 2 ++ 5 files changed, 42 insertions(+) create mode 100644 server/vocab/README.md create mode 100644 server/vocab/anatomy.txt create mode 100644 server/vocab/medications.txt create mode 100644 server/vocab/substances.txt diff --git a/.gitignore b/.gitignore index 17b974d..ce93c33 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ users.toml *.snap.new repomix-output.xml tmpdata/ +server/vocab/raw/ diff --git a/server/vocab/README.md b/server/vocab/README.md new file mode 100644 index 0000000..e25a618 --- /dev/null +++ b/server/vocab/README.md @@ -0,0 +1,35 @@ +# Gazetteer vocabulary files + +These `*.txt` files are loaded once at server startup and used to annotate +Whisper transcripts with correction hints of the form `Token [?Canonical]` +before the analysis LLM runs. Design: `~/.claude/plans/happy-mapping-snail.md`. + +## File format + +- One entry per line, UTF-8, no surrounding whitespace required. +- Lines that are blank or start with `#` are skipped. +- Case-insensitive. Duplicates across files are collapsed. +- No header row, no columns — this is a plain word list. + +## Files + +| File | Domain | Populated? | +| ----------------- | ------------------------------------- | ------------- | +| `anatomy.txt` | Latin/Greek anatomical terms | build script | +| `substances.txt` | Exotic active substances (INNs) | TBD | +| `medications.txt` | Exotic medication brand names | TBD | + +## Build scripts + +The `anatomy.txt` is produced by shell pipeline under `../scripts/`: + +``` +./scripts/build-anatomy.sh +``` + +It crawls the German Wikipedia "Kategorie:Anatomie", filters the result +against `hunspell-de-de` to remove everyday German words, and writes the +remainder here. The result is checked into git — we rebuild only when the +source vocabulary materially changes, not on every server build. + +Intermediate files land under `vocab/raw/`, which is gitignored. diff --git a/server/vocab/anatomy.txt b/server/vocab/anatomy.txt new file mode 100644 index 0000000..3bbbd6e --- /dev/null +++ b/server/vocab/anatomy.txt @@ -0,0 +1,2 @@ +# Anatomical Latin/Greek terms. Populate via ./scripts/build-anatomy.sh. +# Blank — mechanism runs as no-op until content is built. diff --git a/server/vocab/medications.txt b/server/vocab/medications.txt new file mode 100644 index 0000000..8b879b5 --- /dev/null +++ b/server/vocab/medications.txt @@ -0,0 +1,2 @@ +# Exotic medication brand names. Population script TBD. +# Candidate sources: Wikidata (P267 ATC-code joins), Rote Liste alternatives. diff --git a/server/vocab/substances.txt b/server/vocab/substances.txt new file mode 100644 index 0000000..7e455c7 --- /dev/null +++ b/server/vocab/substances.txt @@ -0,0 +1,2 @@ +# Exotic active substances (INN names). Population script TBD. +# Candidate source: WHO ATC classification (free, tabular).