pub struct DictionaryDetector { /* private fields */ }Expand description
Detector for automatically identifying which dictionary was used to encode data.
Implementations§
Source§impl DictionaryDetector
impl DictionaryDetector
Sourcepub fn new(config: &DictionaryRegistry) -> Result<Self, Box<dyn Error>>
pub fn new(config: &DictionaryRegistry) -> Result<Self, Box<dyn Error>>
Creates a new detector from a configuration.
Note: Word-based dictionaries are skipped as they require different detection logic.
Sourcepub fn detect(&self, input: &str) -> Vec<DictionaryMatch>
pub fn detect(&self, input: &str) -> Vec<DictionaryMatch>
Detect which dictionary was likely used to encode the input. Returns matches sorted by confidence (highest first).
Auto Trait Implementations§
impl Freeze for DictionaryDetector
impl RefUnwindSafe for DictionaryDetector
impl Send for DictionaryDetector
impl Sync for DictionaryDetector
impl Unpin for DictionaryDetector
impl UnwindSafe for DictionaryDetector
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