Files
doctate/server/Cargo.toml
T
Brummel 997af407b6 feat: Add hunspell dictionary support to gazetteer
Integrates the `spellbook` crate to allow for a Hunspell dictionary to
be used as a veto mechanism within the gazetteer.

This prevents common German words from being incorrectly rewritten to
vocabulary entries if they fall within the edit distance threshold. For
example, "Kaktus" will no longer be rewritten to "Lantus" if a Hunspell
dictionary is provided and contains "Kaktus".

The `hunspell_dict_path` configuration option is added, defaulting to
`/usr/share/hunspell/de_DE`. This path should point to the stem of the
Hunspell dictionary files (e.g., `/usr/share/hunspell/de_DE.aff` and
`/usr/share/hunspell/de_DE.dic`).

The gazetteer now supports an optional `DictChecker` trait, allowing for
pluggable dictionary implementations. `SpellbookDict` is the initial
implementation using the `spellbook` crate.

Includes new tests to verify the dict veto functionality, including
handling of case sensitivity and exact matches. An ignored test is added
for live verification against system-installed Hunspell dictionaries.
2026-04-17 12:30:34 +02:00

35 lines
1.1 KiB
TOML

[package]
name = "doctate-server"
version = "0.1.0"
edition = "2024"
default-run = "doctate-server"
[dependencies]
axum = { version = "0.8", features = ["multipart"] }
tokio = { version = "1", features = ["full"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "multipart", "rustls-tls"] }
tempfile = "3"
askama = "0.12"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-appender = "0.2"
dotenvy = "0.15"
uuid = { version = "1", features = ["v4", "serde"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
tower-http = { version = "0.6", features = ["limit", "trace"] }
rand = "0.8"
bcrypt = "0.15"
axum-extra = { version = "0.12", features = ["cookie", "form"] }
time = { version = "0.3.47", features = ["local-offset", "parsing", "formatting", "macros"] }
toml_edit = "0.25.11"
rpassword = "7.4.0"
pulldown-cmark = { version = "0.13", default-features = false, features = ["html"] }
strsim = "0.11"
spellbook = "0.4.0"
[dev-dependencies]
tower = { version = "0.5", features = ["util"] }
wiremock = "0.6"