Skip to main content

Module fuzzy_similarity

Module fuzzy_similarity 

Source
Expand description

Fuzzy RDF graph similarity (Ma, Li & Ma ch 3.4) — a degree-aware similarity between two fuzzy RDF graphs (triples carrying a membership degree). The fuzzy Jaccard generalizes set overlap to graded membership: shared structure counts in proportion to how strongly both graphs assert it. Kernel-class Reduction.

Structs§

FuzzyTriple
An RDF triple (s, p, o) with a membership degree in [0,1]. Terms are term ids (interned URIs).

Functions§

fuzzy_dice
Degree-weighted overlap (Dice-style): 2·Σ min / (Σd₁ + Σd₂). An alternative emphasizing shared mass. Returns [0,1].
fuzzy_jaccard
Fuzzy Jaccard similarity Σ min(d₁,d₂) / Σ max(d₁,d₂) over the union of triples (a missing triple has degree 0). Returns [0,1]; 1.0 for identical graphs, 0.0 for disjoint ones. Two empty graphs are defined as similarity 1.0.