Skip to main content

Crate rsmarisa

Crate rsmarisa 

Source
Expand description

§marisa

Rust port of marisa-trie: a static and space-efficient trie data structure.

Ported from: include/marisa.h

§About MARISA

MARISA (Matching Algorithm with Recursively Implemented StorAge) is a static and space-efficient trie data structure. This Rust implementation aims to maintain compatibility with the original C++ implementation while leveraging Rust’s safety features.

§Features

A MARISA-based dictionary supports:

  • Lookup: Check whether a given string exists in the dictionary
  • Reverse lookup: Restore a key from its ID
  • Common prefix search: Find keys from prefixes of a given string
  • Predictive search: Find keys starting with a given string

§Original Project

This is a Rust port of marisa-trie originally written by Susumu Yata.

  • Original version: 0.3.1
  • Baseline commit: 4ef33cc5a2b6b4f5e147e4564a5236e163d67982
  • Original license: BSD-2-Clause OR LGPL-2.1-or-later

Re-exports§

pub use agent::Agent;
pub use key::Key;
pub use keyset::Keyset;
pub use query::Query;
pub use trie::Trie;

Modules§

agent
Agent for trie operations.
base
Base types, constants, and error definitions.
grimoire
Internal implementation modules.
key
Key type for trie operations.
keyset
Keyset for collecting keys to build a trie.
query
Query type for trie searches.
trie
Trie data structure.