rustledger_ops/lib.rs
1//! Pure operations on beancount directives.
2//!
3//! This crate provides reusable functions for transforming and analyzing
4//! collections of beancount directives. All operations are pure — they take
5//! directives in and return results out, with no I/O or framework coupling.
6//!
7//! Analogous to Python beancount's `ops/` module.
8//!
9//! # Modules
10//!
11//! - [`fingerprint`] — structural hashing and stable fingerprinting of transactions
12//! - [`dedup`] — duplicate detection (structural, fuzzy, and fingerprint-based)
13//! - [`categorize`] — rules engine for transaction categorization (substring, regex, exact match)
14//! - [`merchants`] — built-in merchant dictionary of common patterns
15//! - [`enrichment`] — shared types for operation results (confidence, method, alternatives)
16//! - [`reconcile`] — balance reconciliation against statement ending balances
17//! - [`ml`] — ML-based categorization (TF-IDF + an in-house Multinomial
18//! Naive Bayes classifier, pure `std`, available on every target)
19//! - [`transfer`] — inter-account transfer detection and linking
20
21#![forbid(unsafe_code)]
22#![warn(missing_docs)]
23
24pub mod categorize;
25pub mod dedup;
26pub mod enrichment;
27pub mod fingerprint;
28pub mod merchants;
29pub mod ml;
30pub mod reconcile;
31pub mod transfer;