feat: added ground_term and wire into advanced_search

Closes #7

Added Levenshtein-based typo correction for the 6 groundable fields in advanced_search.

  • Added src/vocab/vocab.json : 254 canonical terms across period, language, genre, material, artifact_type, provenience; derived from CDLI ElasticSearch aggregation with hierarchy flattened and annotations stripped
  • Added src/vocab/load.ts : loads vocab into a Map<string, string[]> at module level
  • Added src/vocab/ground_term.ts : case-insensitive Levenshtein (threshold 3) via fastest-levenshtein; values outside threshold pass through untouched for CDLI to handle
  • Wired grounding into advanced_search; corrections echoed in response (e.g. Grounded: "Ur 3" → "Ur III")
  • Bumped default timeout from 8s → 10s; advanced_search uses 15s

Merge request reports

Loading