pub struct AnalyzerEngine { /* private fields */ }Expand description
Main analyzer engine that coordinates recognition and anonymization
Implementations§
Source§impl AnalyzerEngine
impl AnalyzerEngine
Sourcepub fn builder() -> AnalyzerEngineBuilder
pub fn builder() -> AnalyzerEngineBuilder
Create a builder for custom configuration
Sourcepub fn with_language(self, language: impl Into<String>) -> Self
pub fn with_language(self, language: impl Into<String>) -> Self
Set the default language
Sourcepub fn with_model_version(self, version: impl Into<String>) -> Self
pub fn with_model_version(self, version: impl Into<String>) -> Self
Set the model version (for NER)
Sourcepub fn recognizer_registry(&self) -> &RecognizerRegistry
pub fn recognizer_registry(&self) -> &RecognizerRegistry
Get the recognizer registry
Sourcepub fn recognizer_registry_mut(&mut self) -> &mut RecognizerRegistry
pub fn recognizer_registry_mut(&mut self) -> &mut RecognizerRegistry
Get mutable access to the recognizer registry
Sourcepub fn anonymizer_registry(&self) -> &AnonymizerRegistry
pub fn anonymizer_registry(&self) -> &AnonymizerRegistry
Get the anonymizer registry
Sourcepub fn anonymizer_registry_mut(&mut self) -> &mut AnonymizerRegistry
pub fn anonymizer_registry_mut(&mut self) -> &mut AnonymizerRegistry
Get mutable access to the anonymizer registry
Sourcepub fn analyze(
&self,
text: &str,
language: Option<&str>,
) -> Result<AnalysisResult>
pub fn analyze( &self, text: &str, language: Option<&str>, ) -> Result<AnalysisResult>
Analyze text and detect PII entities
Sourcepub fn analyze_with_entities(
&self,
text: &str,
entity_types: &[EntityType],
language: Option<&str>,
) -> Result<AnalysisResult>
pub fn analyze_with_entities( &self, text: &str, entity_types: &[EntityType], language: Option<&str>, ) -> Result<AnalysisResult>
Analyze text with specific entity types
Sourcepub fn anonymize(
&self,
text: &str,
language: Option<&str>,
config: &AnonymizerConfig,
) -> Result<AnonymizedResult>
pub fn anonymize( &self, text: &str, language: Option<&str>, config: &AnonymizerConfig, ) -> Result<AnonymizedResult>
Anonymize text based on detected entities
Sourcepub fn analyze_and_anonymize(
&self,
text: &str,
language: Option<&str>,
config: &AnonymizerConfig,
) -> Result<AnalysisResult>
pub fn analyze_and_anonymize( &self, text: &str, language: Option<&str>, config: &AnonymizerConfig, ) -> Result<AnalysisResult>
Analyze and anonymize in one call
Trait Implementations§
Source§impl Clone for AnalyzerEngine
impl Clone for AnalyzerEngine
Source§fn clone(&self) -> AnalyzerEngine
fn clone(&self) -> AnalyzerEngine
Returns a duplicate of the value. Read more
1.0.0 · 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 AnalyzerEngine
impl Debug for AnalyzerEngine
Auto Trait Implementations§
impl Freeze for AnalyzerEngine
impl !RefUnwindSafe for AnalyzerEngine
impl Send for AnalyzerEngine
impl Sync for AnalyzerEngine
impl Unpin for AnalyzerEngine
impl !UnwindSafe for AnalyzerEngine
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