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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! Core functionality for the ODict dictionary format.
//!
//! This module provides the fundamental operations for working with ODict dictionaries,
//! including compilation, reading, writing, lookup, and various utility functions.
//!
//! # Overview
//!
//! The core module is organized into several key areas:
//!
//! - **Compilation & Serialization**: [`compile`] - Convert dictionaries to binary format
//! - **Reading & Deserialization**: [`read`] - Load dictionaries from various sources
//! - **Writing**: [`write`] - Save dictionaries to disk
//! - **Lookup Operations**: [`lookup`] - Search and retrieve dictionary entries
//! - **Dictionary Management**: [`merge`], [`lexicon`] - Combine dictionaries and extract terms
//! - **Utilities**: [`preview`], [`rank`], [`resolve`] - Additional dictionary operations
//! - **Version Management**: [`version`] - Semantic versioning support
//!
//! # Examples
//!
//! ## Basic Dictionary Operations
//!
//! ```rust
//! use odict::{Dictionary, OpenDictionary};
//!
//! // Load a dictionary from XML
//! let dict = Dictionary::from_path("dictionary.xml")?;
//!
//! // Compile to binary format
//! let compiled = dict.build()?;
//!
//! // Save to disk
//! compiled.to_disk("dictionary.odict")?;
//!
//! // Load from binary
//! let loaded = OpenDictionary::from_path("dictionary.odict")?;
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
//!
//! ## Dictionary Lookup
//!
//! ```rust
//! use odict::{OpenDictionary, LookupOptions, LookupStrategy};
//!
//! let dict = OpenDictionary::from_path("dictionary.odict")?;
//! let archived = dict.contents()?;
//!
//! // Simple lookup
//! let queries = vec!["hello"];
//! let results = archived.lookup(&queries, LookupOptions::default())?;
//!
//! // Advanced lookup with options
//! let options = LookupOptions::default()
//! .insensitive(true)
//! .follow(5)
//! .strategy(LookupStrategy::Split(2));
//! let results = archived.lookup(&queries, options)?;
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
pub use ArchivedOption;