mirror of
https://github.com/samvallad33/vestige.git
synced 2026-05-09 07:42:37 +02:00
chore: license AGPL-3.0, zero clippy warnings, CHANGELOG through v1.6.0
License: - Replace MIT/Apache-2.0 with AGPL-3.0-only across all crates and npm packages - Replace LICENSE file with official GNU AGPL-3.0 text - Remove LICENSE-MIT and LICENSE-APACHE Code quality: - Fix all 44 clippy warnings (zero remaining) - Collapsible if statements, redundant closures, manual Option::map - Remove duplicate #[allow(dead_code)] attributes in deprecated tool modules - Add Default impl for CognitiveEngine - Replace manual sort_by with sort_by_key Documentation: - Update CHANGELOG with v1.2.0, v1.3.0, v1.5.0, v1.6.0 entries - Update README with v1.6.0 highlights and accurate stats (52K lines, 1100+ tests) - Add fastembed-rs/ to .gitignore - Add fastembed-rs to workspace exclude 1115 tests passing, zero warnings, RUSTFLAGS="-Dwarnings" clean.
This commit is contained in:
parent
495a88331f
commit
ce520bb246
40 changed files with 953 additions and 424 deletions
|
|
@ -175,7 +175,7 @@ pub async fn execute(
|
|||
|
||||
for i in 0..n {
|
||||
for j in (i + 1)..n {
|
||||
let sim = cosine_similarity(&filtered_embeddings[i].2, &filtered_embeddings[j].2);
|
||||
let sim = cosine_similarity(filtered_embeddings[i].2, filtered_embeddings[j].2);
|
||||
if sim >= threshold {
|
||||
uf.union(i, j);
|
||||
similarities.push((i, j, sim));
|
||||
|
|
@ -195,7 +195,7 @@ pub async fn execute(
|
|||
.into_values()
|
||||
.filter(|c| c.len() > 1)
|
||||
.collect();
|
||||
clusters.sort_by(|a, b| b.len().cmp(&a.len()));
|
||||
clusters.sort_by_key(|b| std::cmp::Reverse(b.len()));
|
||||
clusters.truncate(limit);
|
||||
|
||||
// Build similarity lookup for formatting
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue