Crates.io | magnetise |
lib.rs | magnetise |
version | 0.1.2 |
source | src |
created_at | 2024-09-04 16:32:54.151522 |
updated_at | 2024-09-04 17:27:01.687933 |
description | A Rust library to asses the similarity between SQL queries. |
homepage | |
repository | https://github.com/iteralabs/magnetise |
max_upload_size | |
id | 1363513 |
size | 43,645 |
Welcome to magnetise, a Rust library to asses the similarity between SQL queries.
fn main() {
// Short length queries are cases with
// higher sensibility towards small differences.
let query1 = "SELECT * FROM users WHERE age > 30";
let query2 = "SELECT * FROM users WHERE age > 31";
let similarity = jaccard_similarity(query1, query2);
println!("Jaccard similarity: {}", similarity);
}