Skip to main content
Keyhammer logoKeyhammer logo

Keyhammer

Typo-tolerant top-k search over a compact trie, with keyboard-aware edit costs.

Status: unpublished prototype (M0). Nothing is published to crates.io or npm and the API is unstable. Speed against the previous engine and ranking quality against a simple edit-distance-plus-frequency baseline are reported, with their caveats, on the results page. The project claims no novelty. See also the prior art.

Fixed-point weighted edit costs

Edit costs are integers (16 is one ordinary edit), so search bounds are exact and results are identical on every platform. A neighbouring QWERTY key costs less than an arbitrary substitution. The cost values are provisional.

Exact best-first top-k over a trie

Terms live in a flat trie; each node carries one banded edit-distance row and a lower bound. The first terminal popped is always the best remaining one, and oracle tests compare the results with brute force.

no_std, no unsafe, zero dependencies

The core crate needs only alloc, forbids unsafe code and has no runtime dependencies.