#!/usr/bin/env bash
#
# Filter a word list to entries NOT recognised by hunspell-de. Uses
# `hunspell -l` (list-unknown-words mode) — a single batch invocation,
# orders of magnitude faster than per-word lookups.
#
# Multi-word input lines are split into words by hunspell; only the
# individual unknown words are kept. That matches our gazetteer's
# token-level matching model (see gazetteer/mod.rs).
#
# Dependencies: hunspell + German dictionary. Package names vary:
# Arch/CachyOS: pacman -S hunspell hunspell-de
# Debian/Ubuntu: apt install hunspell hunspell-de-de
# Fedora: dnf install hunspell hunspell-de
#
# Usage: ./filter-hunspell-de.sh