Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 41s
editDist as an O(m*n) row-based Levenshtein DP (naive recursion is exponential and times out under load); fuzzyTerms/fuzzyDocs/fuzzyRankTfIdf expand a term to indexed terms within a max edit distance. 166/166. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
31 lines
945 B
Plaintext
31 lines
945 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, fedIndex, aclFilter, searchTfIdfAcl,
|
|
;; topNTfIdfAcl, searchBm25Acl, prefixTerms, prefixDocs, prefixRankTfIdf,
|
|
;; paginate, pageTfIdf, pageBm25, resultCount, editDist, fuzzyTerms, fuzzyDocs,
|
|
;; fuzzyRankTfIdf.
|
|
|
|
(define
|
|
search/src
|
|
(str
|
|
search/tokenize-src
|
|
"\n"
|
|
search/index-src
|
|
"\n"
|
|
search/query-src
|
|
"\n"
|
|
search/parse-src
|
|
"\n"
|
|
search/rank-src
|
|
"\n"
|
|
search/fed-src
|
|
"\n"
|
|
search/prefix-src
|
|
"\n"
|
|
search/page-src
|
|
"\n"
|
|
search/fuzzy-src))
|