Search providers: SearXNG and Brave with ranking (#67)
CI / ci (push) Successful in 1m37s

Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
This commit was merged in pull request #67.
This commit is contained in:
2026-10-05 13:41:48 -04:00
committed by approver_agent
parent ec5b586c16
commit 2fb7807af3
7 changed files with 1041 additions and 1 deletions
+8 -1
View File
@@ -53,7 +53,14 @@ func Normalize(name string) string {
// similarity of their normalized forms is at least SimilarThreshold. A name
// with no words left after normalizing is similar to nothing.
func Similar(a, b string) bool {
return similarity(tokenSet(a), tokenSet(b)) >= SimilarThreshold
return Similarity(a, b) >= SimilarThreshold
}
// Similarity is the token-set (Jaccard) similarity of a's and b's normalized
// forms, from 0 (no shared word) to 1 (the same words). A name with no words
// left after normalizing scores 0 against everything.
func Similarity(a, b string) float64 {
return similarity(tokenSet(a), tokenSet(b))
}
// tokenSet returns the distinct words of name's normalized form.