by ordo-one
Fuzzy string matches at full speed
# Add to your Claude Code skills
git clone https://github.com/ordo-one/FuzzyMatchA high-performance fuzzy string matching library for Swift.
FuzzyMatch was developed for searching financial instrument databases — stock tickers, fund names, ISINs — where typo tolerance, prefix-aware ranking, and sub-millisecond latency matter. The same qualities make it well suited to any domain with a large, heterogeneous candidate set: code identifiers, file names, product catalogs, contact lists, or anything else a user might search with imprecise input.
Full API documentation is available on the Swift Package Index.
No comments yet. Be the first to share your thoughts!
Sendable compliance for concurrent usageAdd FuzzyMatch to your Package.swift:
dependencies: [
.package(url: "https://github.com/ordo-one/FuzzyMatch.git", from: "1.0.0")
]
Then add it to your target dependencies:
.target(
name: "YourTarget",
dependencies: ["FuzzyMatch"]
)
import FuzzyMatch
let matcher = FuzzyMatcher()
// One-shot scoring — simplest API
if let match = matcher.score("getUserById", against: "getUser") {
print("score=\(match.score), kind=\(match.kind)")
}
// Top-N matching — returns sorted results
let query = matcher.prepare("config")
let top3 = matcher.topMatches(
...