marisa/lib.rs
1//! # marisa
2//!
3//! Rust port of marisa-trie: a static and space-efficient trie data structure.
4//!
5//! Ported from: include/marisa.h
6//!
7//! ## About MARISA
8//!
9//! MARISA (Matching Algorithm with Recursively Implemented StorAge) is a static
10//! and space-efficient trie data structure. This Rust implementation aims to
11//! maintain compatibility with the original C++ implementation while leveraging
12//! Rust's safety features.
13//!
14//! ## Features
15//!
16//! A MARISA-based dictionary supports:
17//! - **Lookup**: Check whether a given string exists in the dictionary
18//! - **Reverse lookup**: Restore a key from its ID
19//! - **Common prefix search**: Find keys from prefixes of a given string
20//! - **Predictive search**: Find keys starting with a given string
21//!
22//! ## Original Project
23//!
24//! This is a Rust port of [marisa-trie](https://github.com/s-yata/marisa-trie)
25//! originally written by Susumu Yata.
26//!
27//! - Original version: 0.3.1
28//! - Baseline commit: 4ef33cc5a2b6b4f5e147e4564a5236e163d67982
29//! - Original license: BSD-2-Clause OR LGPL-2.1-or-later
30
31#![warn(missing_docs)]
32#![warn(rust_2018_idioms)]
33
34pub mod agent;
35pub mod base;
36pub mod grimoire;
37pub mod key;
38pub mod keyset;
39pub mod query;
40pub mod trie;
41
42// Re-export main types at the crate root
43// These correspond to the public API in include/marisa/*.h
44pub use agent::Agent;
45pub use key::Key;
46pub use keyset::Keyset;
47pub use query::Query;
48pub use trie::Trie;