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
//! Implementation of Directed Acyclic Word Graph (DAWG) in Rust (pronounced "DAWG") as described by
//! Steve Hanov [Compressing Dictionaries with a DAWG](http://stevehanov.ca/blog/?id=115) (thank you!!)
//!
//!
//!
//! Add the following to your `Cargo.toml`
//!
//! ```toml
//! [depedencies.dawg]
//! version = "x"
//! features = ["threading" ]
//! ```
//! [threading] - Support Send + Sync
//!
//! ```Rust
//! use dawg::Dawg;
//!
//! let mut dawgie = Dawg::new();
//! let mut words = vec!["BAM", "BAT", "BATH", "CATH", "BATHE", "CAR", "CARS", "CAREERS, "SILENT", "LIST", "LISTEN", "AYÒ", "ÒYÀ"].iter().map(|w| w.to_string().to_uppercase()).collect::<Vec<_>>();
//!
//! words.sort();
//!
//! for word in words {
//! dawgie.insert(word.to_string());
//! }
//!
//! // to avoid unintended behaviours always remember to close (.finish) after building the dawg
//!
//! dawgie.finish();
//!
//!
//! assert!(dawgie.lookup("BATH").is_some());
//! assert!(dawgie.is_some());
//! ```
// mod repository;
pub use crateDawg;
pub use crateNode;