Docs.rs
lean-ctx-3.11.3
Go to latest version
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
Skip to main content
Module codebook
lean_
ctx
3.11.3
Module codebook
Module Items
Structs
Functions
In lean_
ctx::
core
lean_ctx
::
core
Module
codebook
Copy item path
Source
Structs
§
Codebook
Codebook
Entry
Cross-file semantic deduplication via TF-IDF codebook.
Functions
§
find_
semantic_
duplicates
Identify semantically duplicate blocks across files. IDF is computed over the full file corpus for accurate weighting.
tfidf_
cosine_
similarity
Cosine similarity between two documents using TF-IDF vectors. IDF is computed over the two-document corpus to down-weight common terms like
fn
,
let
,
return
and up-weight domain-specific identifiers.
tfidf_
cosine_
similarity_
with_
corpus
TF-IDF cosine similarity with IDF computed over a larger corpus.