Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 37s
rankTfIdf and rankBm25 (configurable k1/b) over the candidate set, float scores with deterministic DocId tiebreak; topNTfIdf/topNBm25. df/idf derived from posting-list length. Tests cover tf/idf behavior, a BM25-vs-TF-IDF flip from length-norm + tf-saturation, the b-parameter effect, tiebreak stability. 101/101. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
20 lines
617 B
Plaintext
20 lines
617 B
Plaintext
;; search public API — assembles the canonical Haskell source from all layers.
|
|
;; Tests and callers concatenate `search/src` with their own top-level bindings
|
|
;; (e.g. "result = lookupTerm \"cat\" idx\n") and evaluate via the haskell-on-sx
|
|
;; interpreter. Public Haskell entry points: indexDoc, lookupTerm, deleteDoc,
|
|
;; docFreq, allTerms, tokens, positioned, evalQuery, parseQuery, searchQuery,
|
|
;; rankTfIdf, rankBm25, topNTfIdf, topNBm25.
|
|
|
|
(define
|
|
search/src
|
|
(str
|
|
search/tokenize-src
|
|
"\n"
|
|
search/index-src
|
|
"\n"
|
|
search/query-src
|
|
"\n"
|
|
search/parse-src
|
|
"\n"
|
|
search/rank-src))
|