SpellKit: Fast Typo Correction with Domain Protection for Ruby
SpellKit brings blazing-fast spell checking and typo correction to Ruby through native Rust bindings. Built on the SymSpell algorithm, it corrects user input at 16,000+ operations/second while preserving technical terms, product codes, and domain-specific terminology.
What makes it special:
- Zero runtime dependencies (pure Ruby + Rust, no external services)
- Protection for technical terms (gene names, SKUs, CAS numbers)
- Hot-reload dictionaries without restarting your application
- Thread-safe concurrent reads with efficient locking
- Aspell-inspired skip patterns (URLs, emails, camelCase, version numbers)
- Preserves canonical forms (NASA stays NASA, iPhone stays iPhone)
Key features:
- 16k ops/sec throughput with 80k word dictionary (p50: 61µs, p95: 66µs)
- Configurable edit distance (1 or 2) and frequency thresholds
- Batch optimization for processing multiple tokens efficiently
- Supports both TSV and space-separated dictionary formats
- Multiple independent instances for different domains (medical, legal, etc.)
- Comprehensive statistics and healthcheck APIs for monitoring
Perfect for search interfaces, data extraction pipelines, form validation, and any application that needs to handle real-world messy input while respecting domain terminology - all within your Ruby process.
Links:
Part of the scientist-labs ecosystem bringing production-ready text processing tools to Ruby.
Post a comment