1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Calculate module.
//!
//! This module provides functions for calculating various metrics and scores.
//!
//! # Structure
//! - `filter.rs` - Filter functions
//! - `fuzzy_str_match.rs` - Fuzzy string matching functions
//! - `group_by.rs` - Group by functions
//! - `levenshtein_distance.rs` - Levenshtein distance functions
//! - `similarity_score.rs` - Similarity score functions
//!
//! # Usage
//! This module is used by the API layer and internal services
//! to calculate various metrics and scores.
//! Especially in the Pipelines engine, where you can do various calculations on the data.
//!
//! # Examples
//! ```
//! let score = similarity_score("hello", "world");
//! assert_eq!(score, 0.0);
//! ```
//!
//! ```
//! let score = fuzzy_str_match("hello", "world");
//! assert_eq!(score, 0.0);
//! ```
//!
//! ```
//! let score = group_by("hello", "world");
//! assert_eq!(score, 0.0);
//! ```
//!
//!
//! ## Table of functions
//! | Function | Description |
//! |----------|-------------|
//! | similarity_score | Similarity score between two strings |
//! | fuzzy_str_match | Fuzzy string matching between two strings |
//! | group_by | Group by a field in a JSON array |
//! | levenshtein_distance | Levenshtein distance between two strings |
//! | similarity_score | Similarity score between two strings |
//! | fuzzy_str_match | Fuzzy string matching between two strings |
//! | group_by | Group by a field in a JSON array |
//!
//!