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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//! Entry resolution operations for ODict dictionaries.
//!
//! This module provides functionality to resolve (look up) dictionary entries
//! by their exact term. Resolution is a simple, direct lookup operation that
//! returns the entry if it exists, or None if not found.
//!
//! # Overview
//!
//! The resolve functionality allows you to:
//! - Look up entries by exact term match
//! - Get direct access to entry data structures
//! - Perform fast O(1) lookups using the underlying hash map
//!
//! # Difference from Lookup
//!
//! Resolution differs from the more complex lookup operations in that it:
//! - Only performs exact matches (no fuzzy matching or strategies)
//! - Does not follow redirects or see_also links
//! - Does not support case-insensitive fallback
//! - Returns the raw entry structure rather than wrapped results
//!
//! # Examples
//!
//! ## Basic Entry Resolution
//!
//! ```rust
//! use odict::Dictionary;
//!
//! let dict = Dictionary::from_path("dictionary.xml")?;
//!
//! if let Some(entry) = dict.resolve("hello") {
//! println!("Found entry for 'hello': {}", entry.term);
//! } else {
//! println!("No entry found for 'hello'");
//! }
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
//!
//! ## Working with Archived Dictionaries
//!
//! ```rust
//! use odict::OpenDictionary;
//!
//! let dict = OpenDictionary::from_path("dictionary.odict")?;
//! let archived = dict.contents()?;
//!
//! if let Some(entry) = archived.resolve("world") {
//! println!("Found archived entry: {}", entry.term.as_str());
//! }
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
use crate;
resolve!;
resolve!;