pub struct EntityResolver { /* private fields */ }Expand description
Fuzzy entity resolver that maps variant spellings to canonical forms.
Implementations§
Source§impl EntityResolver
impl EntityResolver
pub fn new(config: ResolverConfig) -> Self
Sourcepub fn resolve(
&self,
original: &str,
category: &EntityCategory,
existing_entries: &HashMap<String, EntityCategory>,
) -> Option<String>
pub fn resolve( &self, original: &str, category: &EntityCategory, existing_entries: &HashMap<String, EntityCategory>, ) -> Option<String>
Resolve an entity’s original text to a canonical form.
Checks (in order):
- User-defined alias groups (exact match, case-insensitive)
- Fuzzy match against existing vault entries (same category only)
Returns the canonical form if a match is found, or None (use original).
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if the resolver is enabled.
Auto Trait Implementations§
impl Freeze for EntityResolver
impl RefUnwindSafe for EntityResolver
impl Send for EntityResolver
impl Sync for EntityResolver
impl Unpin for EntityResolver
impl UnsafeUnpin for EntityResolver
impl UnwindSafe for EntityResolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more