web-simhash 0.1.1

Web-oriented 64-bit SimHash with weighted features and Google-paper-style lookup tables
Documentation
  • Coverage
  • 22.86%
    8 out of 35 items documented0 out of 0 items with examples
  • Size
  • Source code size: 35.81 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.06 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • joshterrill/web-simhash-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • joshterrill

web-simhash-rs

a small, dependency-free Rust library for web-page near-duplicate detection. It follows the public Google WWW 2007 SimHash paper as closely as practical: weighted document features, 64-bit fingerprints, Hamming distance comparison, and a multi-table index for finding fingerprints within a small bit distance.

Install

cargo add web-simhash

Example

use web_simhash::{SimHash64, SimHashIndex, WebFeatureExtractor};

let extractor = WebFeatureExtractor::default();
let a = SimHash64::from_html("<main>Example page</main>", &extractor);
let b = SimHash64::from_html("<main>Example page updated</main>", &extractor);

let mut index = SimHashIndex::new_google64_k3();
index.insert("a", a);

let matches = index.query(b);