pub struct PersonNameRecognizer;Expand description
Recognizes common person names using a conservative dictionary-backed heuristic.
§Examples
use cloakrs_core::{EntityType, Recognizer};
use cloakrs_patterns::PersonNameRecognizer;
let findings = PersonNameRecognizer.scan("customer name John Smith");
assert_eq!(findings[0].entity_type, EntityType::PersonName);Trait Implementations§
Source§impl Clone for PersonNameRecognizer
impl Clone for PersonNameRecognizer
Source§fn clone(&self) -> PersonNameRecognizer
fn clone(&self) -> PersonNameRecognizer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PersonNameRecognizer
impl Debug for PersonNameRecognizer
Source§impl Default for PersonNameRecognizer
impl Default for PersonNameRecognizer
Source§fn default() -> PersonNameRecognizer
fn default() -> PersonNameRecognizer
Returns the “default value” for a type. Read more
Source§impl Recognizer for PersonNameRecognizer
impl Recognizer for PersonNameRecognizer
Source§fn entity_type(&self) -> EntityType
fn entity_type(&self) -> EntityType
The entity type this recognizer detects.
Source§fn supported_locales(&self) -> &[Locale]
fn supported_locales(&self) -> &[Locale]
Locales this recognizer applies to. Empty means universal.
impl Copy for PersonNameRecognizer
Auto Trait Implementations§
impl Freeze for PersonNameRecognizer
impl RefUnwindSafe for PersonNameRecognizer
impl Send for PersonNameRecognizer
impl Sync for PersonNameRecognizer
impl Unpin for PersonNameRecognizer
impl UnsafeUnpin for PersonNameRecognizer
impl UnwindSafe for PersonNameRecognizer
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